Instructions to use haopt/scflow_t2i with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use haopt/scflow_t2i with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("haopt/scflow_t2i", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| base_model: | |
| - XCLiu/instaflow_0_9B_from_sd_1_5 | |
| <div align="center"> | |
| <h1>Official PyTorch models of "Self-Corrected Flow Distillation for Consistent One-Step and Few-Step Text-to-Image Generation" <a href="https://arxiv.org/abs/2412.16906">(AAAI 2025)</a></h1> | |
| </div> | |
| <div align="center"> | |
| <a href="https://quandao10.github.io/" target="_blank">Quan Dao</a><sup>*12†</sup>   <b>·</b>   | |
| <a href="https://hao-pt.github.io/" target="_blank">Hao Phung</a><sup>*13†</sup>   <b>·</b>   | |
| <a href="https://trung-dt.com/" target="_blank">Trung Dao</a><sup>1</sup>   <b>·</b>   | |
| <a href="https://people.cs.rutgers.edu/~dnm/" target="_blank">Dimitris N. Metaxas</a><sup>2</sup>   <b>·</b>   | |
| <a href="https://sites.google.com/site/anhttranusc/" target="_blank">Anh Tran</a><sup>1</sup> | |
| <br> <br> | |
| <sup>1</sup>VinAI Research   | |
| <sup>2</sup>Rutgers University   | |
| <sup>3</sup>Cornell University | |
| <br> <br> | |
| <a href="https://arxiv.org/abs/2412.16906">[Paper]</a>    | |
| <a href="https://github.com/hao-pt/SCFlow.git">[Code]</a> | |
| <br> <br> | |
| <emp><sup>*</sup>Equal contribution</emp>   | |
| <emp><sup>†</sup>Work done while at VinAI Research</emp> | |
| </div> | |
| ## Model details | |
| We present a distilled Text-to-Image (T2I) model that supports both few-step and single-step generation. Distilled from XCLiu/instaflow_0_9B_from_sd_1_5, our model achieves an FID of 11.91 for 1-NFE generation on the COCO2014 benchmark. | |
| **Please CITE** our paper and give us a :star: whenever this repository is used to help produce published results or incorporated into other software. | |
| ```bibtex | |
| @inproceedings{dao2025scflow, | |
| title = {Self-Corrected Flow Distillation for Consistent One-Step and Few-Step Text-to-Image Generation}, | |
| author = {Quan Dao and Hao Phung and Trung Dao and Dimitris Metaxas and Anh Tran}, | |
| booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence}, | |
| year = {2025} | |
| } | |
| ``` |