Update README.md
Browse files
README.md
CHANGED
|
@@ -20,9 +20,10 @@ Code: https://github.com/CSU-JPG/Glance
|
|
| 20 |
## About
|
| 21 |
Glance introduces a novel approach to accelerate diffusion models by intelligently speeding up denoising phases. Instead of costly retraining, Glance equips base models with lightweight Slow-LoRA and Fast-LoRA adapters. This method achieves up to 5x acceleration over base models while maintaining comparable visual quality and strong generalization on unseen prompts. Notably, the LoRA experts are trained with only 1 sample within an hour.
|
| 22 |
|
| 23 |
-
# 🧪 Usage
|
| 24 |
---
|
| 25 |
|
|
|
|
|
|
|
| 26 |
## 🎨 Inference
|
| 27 |
|
| 28 |
We provide solid 4-GPU inference code for easy multi-card sampling. You can experience our Glance model by running:
|
|
@@ -76,6 +77,44 @@ image.save("output.png")
|
|
| 76 |
|
| 77 |

|
| 78 |
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
## About
|
| 21 |
Glance introduces a novel approach to accelerate diffusion models by intelligently speeding up denoising phases. Instead of costly retraining, Glance equips base models with lightweight Slow-LoRA and Fast-LoRA adapters. This method achieves up to 5x acceleration over base models while maintaining comparable visual quality and strong generalization on unseen prompts. Notably, the LoRA experts are trained with only 1 sample within an hour.
|
| 22 |
|
|
|
|
| 23 |
---
|
| 24 |
|
| 25 |
+
# 🧪 Usage
|
| 26 |
+
|
| 27 |
## 🎨 Inference
|
| 28 |
|
| 29 |
We provide solid 4-GPU inference code for easy multi-card sampling. You can experience our Glance model by running:
|
|
|
|
| 77 |
|
| 78 |

|
| 79 |
|
| 80 |
+
## 🚀 Training
|
| 81 |
+
|
| 82 |
+
### Glance_Qwen Training
|
| 83 |
+
|
| 84 |
+
To start training with your configuration file, simply run:
|
| 85 |
+
|
| 86 |
+
```bash
|
| 87 |
+
accelerate launch train_Glance_qwen.py --config ./train_configs/Glance_qwen.yaml
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
> Note: All the training code is primarily based on [flymyai-lora-trainer](https://github.com/FlyMyAI/flymyai-lora-trainer).
|
| 91 |
+
|
| 92 |
+
Ensure that `Glance_qwen.yaml` is properly configured with your dataset paths, model settings, output directory, and other hyperparameters. You can also explicitly specify whether to train the **Slow-LoRA** or **Fast-LoRA** variant directly within the configuration file.
|
| 93 |
+
|
| 94 |
+
If you want to train on a **single GPU** (requires **less than 24 GB** of VRAM), run:
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
python train_Glance_qwen.py --config ./train_configs/Glance_qwen.yaml
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
### Glance_FLUX Training
|
| 102 |
+
|
| 103 |
+
To launch training for the FLUX variant, run:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
accelerate launch train_Glance_flux.py --config ./train_configs/Glance_flux.yaml
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Citation
|
| 110 |
+
```
|
| 111 |
+
@misc{dong2025glanceacceleratingdiffusionmodels,
|
| 112 |
+
title={Glance: Accelerating Diffusion Models with 1 Sample},
|
| 113 |
+
author={Zhuobai Dong and Rui Zhao and Songjie Wu and Junchao Yi and Linjie Li and Zhengyuan Yang and Lijuan Wang and Alex Jinpeng Wang},
|
| 114 |
+
year={2025},
|
| 115 |
+
eprint={2512.02899},
|
| 116 |
+
archivePrefix={arXiv},
|
| 117 |
+
primaryClass={cs.CV},
|
| 118 |
+
url={https://arxiv.org/abs/2512.02899},
|
| 119 |
+
}
|
| 120 |
+
```
|