AMAP-ML/EMF

[2026 CVPR]Extending One-Step Image Generation from Class Labels to Text via Discriminative Text Representation

109

stars

12

commits

Python

primary language

Apr 15, 2026

updated

README

CVPR2026 Code Release

Installation

1. Create Python 3.11 Virtual Environment

conda create -n cvpr2026 python=3.11
conda activate cvpr2026

2. Install Dependencies

pip install -r requirements.txt

3. Install Modified diffusers Library

Download diffusers v0.34.0 and replace the sana_transformer.py file:

# Clone diffusers repository
git clone https://github.com/huggingface/diffusers.git
cd diffusers
git checkout v0.34.0

# Replace sana_transformer.py
# Location: src/diffusers/models/transformers/sana_transformer.py
cp ../sana_transformer.py src/diffusers/models/transformers/sana_transformer.py

# Install modified diffusers
pip install -e .
cd ..

4. Install Project

pip install -e .

Usage

Training

Modify the model paths and parameters in scripts/sft.sh, then run:

bash scripts/sft.sh

Inference

Modify the model paths and parameters in inference.py, then run:

python inference.py

Acknowledgements

This code is built upon BLIP3o and MeanFlow. We sincerely thank the authors for their excellent work.

Contributors

ZhaoChenxi-nku

11 commits

chenzhu01

1 commits

AMAP-ML/EMF

[2026 CVPR]Extending One-Step Image Generation from Class Labels to Text via Discriminative Text Representation

109

stars

12

commits

Python

primary language

Apr 15, 2026

updated

README

CVPR2026 Code Release

Installation

1. Create Python 3.11 Virtual Environment

conda create -n cvpr2026 python=3.11
conda activate cvpr2026

2. Install Dependencies

pip install -r requirements.txt

3. Install Modified diffusers Library

Download diffusers v0.34.0 and replace the sana_transformer.py file:

# Clone diffusers repository
git clone https://github.com/huggingface/diffusers.git
cd diffusers
git checkout v0.34.0

# Replace sana_transformer.py
# Location: src/diffusers/models/transformers/sana_transformer.py
cp ../sana_transformer.py src/diffusers/models/transformers/sana_transformer.py

# Install modified diffusers
pip install -e .
cd ..

4. Install Project

pip install -e .

Usage

Training

Modify the model paths and parameters in scripts/sft.sh, then run:

bash scripts/sft.sh

Inference

Modify the model paths and parameters in inference.py, then run:

python inference.py

Acknowledgements

This code is built upon BLIP3o and MeanFlow. We sincerely thank the authors for their excellent work.

Contributors

ZhaoChenxi-nku

11 commits

chenzhu01

1 commits

Languages

Python

94.5%

Jupyter Notebook

5.3%