Analysis updated 2026-05-18
Speed up an existing pretrained text-to-image diffusion model without retraining it.
Reproduce the speedup results reported in the MrFlow research paper on models like Qwen-Image and FLUX.
Combine MrFlow's staged sampling with already-distilled fast models such as Pi-Flow for even greater speedups.
Generate high-resolution images while shifting most of the computation to a cheaper low-resolution stage.
| xingyu-zheng/mrflow | adrienbrault/geekmagic-hacs | karpathy/researchlei | |
|---|---|---|---|
| Stars | 273 | 274 | 274 |
| Language | Python | Python | Python |
| Last pushed | — | — | 2013-05-03 |
| Maintenance | — | — | Dormant |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 2/5 | 3/5 |
| Audience | researcher | vibe coder | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires downloading large pretrained model checkpoints and Real-ESRGAN weights separately, scripts need file paths edited by hand before running.
MrFlow is the official code for a research paper that speeds up AI image generation models without retraining them. The models it works with, called flow-matching diffusion models, normally create an image by gradually refining it over many steps, and doing this at full resolution is slow. MrFlow changes the order of operations: it first generates a low-resolution version of the image, which is fast, then uses a separate tool called Real-ESRGAN to upscale that image, and finally runs a short refinement pass at full resolution to restore fine detail. Most of the expensive work happens at low resolution, and only a small amount happens at high resolution. Because no training or fine-tuning is needed, MrFlow can be dropped onto an existing pretrained model. The authors report it works with several popular image models, including Qwen-Image, FLUX.1-dev, FLUX.2 Klein, and Z-Image, and it can even be combined with already-accelerated distilled models such as Pi-Flow and FLUX-schnell. Reported end-to-end speedups range from about 8 times faster on FLUX.1-dev to as much as 25 times faster on Qwen-Image when paired with Pi-Flow, measured across the whole process including text encoding and image decoding, not just the core generation step. The repository ships two minimal example scripts, one for Qwen-Image and one for FLUX.1-dev, where a person edits the file paths to point at their own downloaded model checkpoint and the Real-ESRGAN upscaling weights, then runs the script from the command line. Additional example scripts for other supported models live in a separate examples folder. Using MrFlow requires a working Python environment with PyTorch, the Diffusers library, and Transformers already installed, along with the pretrained model files themselves, which are not included in the repository and must be downloaded separately. The project accompanies a published research paper on arXiv and is aimed at people already working with these image generation models who want faster results.
MrFlow speeds up AI image generation models by generating a low-resolution image first, upscaling it, then quickly refining it, without any retraining.
Mainly Python. The stack also includes Python, PyTorch, Diffusers.
No license information is stated in the README.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.