MCPcopy Index your code
hub / github.com/AMAP-ML/EMF

github.com/AMAP-ML/EMF @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,140 symbols 5,556 edges 157 files 420 documented · 37%
What it actually does AI analysis from the code graph — generated when you open this
loading…
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.

Core symbols most depended-on inside this repo

from_pretrained
called by 150
trl/trl/models/modeling_base.py
push_to_hub
called by 53
trl/trl/models/modeling_base.py
train
called by 41
trl/trl/trainer/ppo_trainer.py
update
called by 37
trl/trl/trainer/utils.py
save_model
called by 32
trl/trl/trainer/ppo_trainer.py
generate
called by 30
trl/trl/extras/vllm_client.py
pad
called by 25
trl/trl/trainer/utils.py
log
called by 25
trl/trl/trainer/kto_trainer.py

Shape

Method 673
Function 274
Class 184
Route 9

Languages

Python100%

Modules by API surface

trl/trl/trainer/utils.py51 symbols
tok/ar_dtok/ar_model.py51 symbols
trl/trl/trainer/grpo_trainer.py41 symbols
tok/ar_dtok/vqvae.py39 symbols
trl/trl/models/modeling_sd_base.py37 symbols
trl/trl/trainer/dpo_trainer.py30 symbols
trl/trl/trainer/bco_trainer.py30 symbols
trl/trl/trainer/callbacks.py28 symbols
trl/trl/scripts/vllm_serve.py28 symbols
trl/trl/trainer/kto_trainer.py25 symbols
trl/trl/trainer/judges.py22 symbols
trl/trl/models/modeling_value_head.py22 symbols

For agents

$ claude mcp add EMF \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact