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
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div align="center">
|
| 2 |
+
<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>
|
| 3 |
+
</div>
|
| 4 |
+
|
| 5 |
+
<div align="center">
|
| 6 |
+
<a href="https://quandao10.github.io/" target="_blank">Quan Dao</a><sup>*12†</sup>   <b>·</b>  
|
| 7 |
+
<a href="https://hao-pt.github.io/" target="_blank">Hao Phung</a><sup>*13†</sup>   <b>·</b>  
|
| 8 |
+
<a href="https://trung-dt.com/" target="_blank">Trung Dao</a><sup>1</sup>   <b>·</b>  
|
| 9 |
+
<a href="https://people.cs.rutgers.edu/~dnm/" target="_blank">Dimitris N. Metaxas</a><sup>2</sup>   <b>·</b>  
|
| 10 |
+
<a href="https://sites.google.com/site/anhttranusc/" target="_blank">Anh Tran</a><sup>1</sup>
|
| 11 |
+
<br> <br>
|
| 12 |
+
<sup>1</sup>VinAI Research  
|
| 13 |
+
<sup>2</sup>Rutgers University  
|
| 14 |
+
<sup>3</sup>Cornell University
|
| 15 |
+
<br> <br>
|
| 16 |
+
<a href="https://arxiv.org/abs/2412.16906">[Paper]</a>   
|
| 17 |
+
<a href="https://github.com/hao-pt/SCFlow.git">[Code]</a>
|
| 18 |
+
<br> <br>
|
| 19 |
+
<emp><sup>*</sup>Equal contribution</emp>  
|
| 20 |
+
<emp><sup>†</sup>Work done while at VinAI Research</emp>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
## Model detais
|
| 24 |
+
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.
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
**Please CITE** our paper and give us a :star: whenever this repository is used to help produce published results or incorporated into other software.
|
| 28 |
+
|
| 29 |
+
```bibtex
|
| 30 |
+
@inproceedings{dao2025scflow,
|
| 31 |
+
title = {Self-Corrected Flow Distillation for Consistent One-Step and Few-Step Text-to-Image Generation},
|
| 32 |
+
author = {Quan Dao and Hao Phung and Trung Dao and Dimitris Metaxas and Anh Tran},
|
| 33 |
+
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
|
| 34 |
+
year = {2025}
|
| 35 |
+
}
|
| 36 |
+
```
|