MrFlow  by Xingyu-Zheng

Training-free diffusion acceleration for text-to-image models

Created 3 weeks ago

New!

273 stars

Top 94.4% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

MrFlow addresses the need for faster text-to-image diffusion model inference. It provides a training-free, staged sampling acceleration method for pretrained flow-matching models, enabling significant speedups without requiring model retraining. This benefits researchers and power users seeking to reduce generation latency while maintaining visual fidelity.

How It Works

The core approach employs a multi-resolution staged sampling pipeline. MrFlow first generates a low-resolution image, upsamples it using Real-ESRGAN in pixel space, re-encodes the result, injects minimal noise, and then performs a brief high-resolution refinement. This strategy strategically shifts the primary computational burden from expensive high-resolution diffusion steps to more efficient low-resolution sampling, preserving fine details.

Quick Start & Requirements

Installation involves setting up a standard PyTorch/Diffusers environment. Key dependencies include PyTorch, Diffusers, Transformers, and Real-ESRGAN. Users must provide paths to a compatible pretrained text-to-image model (e.g., Qwen-Image, FLUX) and Real-ESRGAN x2 weights (specifically from ai-forever/Real-ESRGAN). Primary execution involves running provided Python scripts like qwen_image_mrflow.py after updating checkpoint paths. Official documentation and demos are available via linked arXiv and Hugging Face pages.

Highlighted Details

  • Training-Free Deployment: Operates without finetuning, learned upsamplers, or model-specific retraining.
  • Standard Implementation: Utilizes standard PyTorch and Diffusers, avoiding custom kernels.
  • Aggressive Speedup: Achieves over 10x end-to-end speedup on models like Qwen-Image with minimal quality degradation.
  • Broad Compatibility: Works with various backbones (FLUX, Qwen-Image, Z-Image) and can be combined with distilled models like Pi-Flow.
  • ComfyUI Integration: A dedicated custom-node plugin is available for Qwen-oriented workflows.

Maintenance & Community

The project shows active development with recent updates in July 2026 and features on Hugging Face's trending lists. It fosters community engagement through open discussions and a dedicated area for community contributions, encouraging shared workflows and experiments.

Licensing & Compatibility

The repository README does not explicitly state a software license. This lack of clear licensing information may pose compatibility concerns for commercial use or integration into closed-source projects. The method is compatible with standard Diffusers pipelines.

Limitations & Caveats

Reproducibility requires adherence to specific Real-ESRGAN versions and checkpoints. Integration with optional components like Pi-Flow necessitates additional setup (LakonLab checkout). The absence of a stated license is a notable caveat for adoption decisions.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
8
Star History
274 stars in the last 25 days

Explore Similar Projects

Starred by Kaiming He Kaiming He(Author of ResNet; Professor at MIT; Distinguished Scientist at Google DeepMind).

minit2i-torch by Hope7Happiness

0.3%
286
Minimalist text-to-image generation with PyTorch
Created 2 months ago
Updated 1 month ago
Feedback? Help us improve.