Text-to-Image
diffusion
flow-matching
pixel-space-diffusion
imagenet

Semantic Detour Flow β€” released checkpoints

Weights for Semantic Detour Flow: Pixel Diffusion that Decides Semantics First.

Detour is a pixel-space flow whose noisy state passes through a frozen DINOv2 representation at high noise and hands over to pixels at low noise. One network is trained with a single velocity loss on that path, so it learns semantics near noise and fine detail near data. Sampling is an ordinary pixel ODE straight to RGB: the encoder builds training targets only, and nothing but the generator runs at inference β€” no encoder, no decoder.

This repository holds the weights behind the published main results, and nothing else: 7 files, 33.6 GB.

Files

Path Model Size
imagenet-256/weights-ep200.pth Detour-XL/16 (849M), 256Γ—256, 200 epochs 3.36 GB
imagenet-256/weights-ep320.pth Detour-XL/16 (849M), 256Γ—256, 320 epochs 3.36 GB
imagenet-256/weights-ep20.pth the 256 run at epoch 20 β€” AutoGuidance weak model 3.36 GB
imagenet-512/weights-ep160.pth Detour-XL/32 (849M), 512Γ—512, 160 epochs 3.41 GB
imagenet-512/weights-ep280.pth Detour-XL/32 (849M), 512Γ—512, 280 epochs 3.41 GB
imagenet-512/weights-ep20.pth the 512 run at epoch 20 β€” AutoGuidance weak model 3.41 GB
t2i/checkpoint-it200000.pth Detour-T2I (3.3B), stage C, 200k iterations 13.27 GB

Each file holds the EMA2 weights only β€” the ones that reproduce the published numbers. The optimizer state, the online weights and EMA1 are not published, which is why a 849M model is 3.4 GB rather than 17 GB. model, model_ema1 and model_ema2 all point at the same tensors, so --eval_ema2 stays correct and the repository's commands work unchanged; args and epoch/iter are kept so the architecture rebuilds itself. These files are for sampling and evaluation β€” training cannot be resumed from them.

Results

ImageNet, class-conditional, FID-50k against the train statistics. Guidance is CFG plus AutoGuidance over a window, with the same run's epoch-20 checkpoint as the weak model.

Model Resolution Epochs Unguided CFG only CFG + AutoGuidance
Detour-XL/16 256Γ—256 200 3.69 2.27 1.43
Detour-XL/16 256Γ—256 320 β€” β€” 1.3525 (IS 267.2)
Detour-XL/32 512Γ—512 160 4.19 2.54 1.59
Detour-XL/32 512Γ—512 280 β€” β€” 1.3541 (IS 297.4)

Text-to-image, 3.3B, from t2i/checkpoint-it200000.pth:

Resolution GenEval overall DPG-Bench overall
512Γ—512 0.90 87.8
1024Γ—1024 0.88 87.4

Download

Pull a resolution as a folder, so the AutoGuidance weak model lands beside its checkpoint β€” which is what the evaluation script assumes when it derives --autoguide_ckpt:

pip install huggingface-hub
hf download quandao10/detour-flow --include "imagenet-256/*" --local-dir exps   # 10 GB

One file at a time works too, as long as the weak model goes to the same directory:

hf download quandao10/detour-flow imagenet-256/weights-ep200.pth --local-dir exps
hf download quandao10/detour-flow imagenet-256/weights-ep20.pth  --local-dir exps

Use

These are plain PyTorch checkpoints for the training code, not a diffusers pipeline. Clone the repository and score or sample with its scripts, which already apply the published recipe:

git clone https://github.com/quandao10/detour-flow && cd detour-flow
pip install -r requirements.txt

# FID-50k, unguided
MODEL=JiT-XL/16 scripts/imagenet/eval.sh exps/imagenet-256/weights-ep200.pth

# the paper's guided number: CFG 1.75 + AutoGuidance 2.0 from weights-ep20.pth beside it
MODEL=JiT-XL/16 GUIDED=1 scripts/imagenet/eval.sh exps/imagenet-256/weights-ep200.pth

# 512
MODEL=JiT-XL/32 RES=512 GUIDED=1 scripts/imagenet/eval.sh exps/imagenet-512/weights-ep160.pth

Settings that reproduce the numbers

scripts/imagenet/recipe.sh applies these by default; they are listed here for anyone sampling by hand.

ImageNet 256 ImageNet 512 T2I 512 T2I 1024
checkpoint XL/16 ep200 XL/32 ep160 stage C 200k stage C 200k
weights EMA2, 0.9996 EMA2, 0.9996 EMA2, 0.9995 EMA2, 0.9995
sampler Euler, 100 steps Euler, 100 steps Heun, 30 steps Heun, 30 steps
time grid power, t = u⁴ power, t = u⁴ power, t = u² power, t = u²
guidance CFG 1.75 + AG 2.0 CFG 2.0 + AG 2.0 plain CFG 14 plain CFG 6
guidance window [0.05, 0.9] [0.05, 0.75] whole path whole path
--noise_scale 1.0 2.0 1.0 1.0

The two longer runs change only the checkpoint, the CFG scale and β€” at 512 β€” the window: epoch 320 at 256 uses CFG 1.625, and epoch 280 at 512 uses the window [0.05, 0.9], not the 0.75 that is the default for that resolution. Epoch 320 at 512 is worse than epoch 280 (unguided FID-10k 6.5579 against 6.1962), which is why 280 is the checkpoint released there.

CHECKPOINTS.md maps every file to the number it produces.

Limitations and intended use

Research artefacts for reproducing and building on the paper. The ImageNet models are class-conditional over the 1000 ImageNet classes and generate nothing outside them. The text-to-image model is trained on about 31M public image–text pairs, 13M of them synthetic, and inherits the biases and failure modes of that corpus; it is not filtered or aligned for deployment. Only sampling weights are published, so training cannot be resumed from these files.

Citation

@article{dao2026detour,
  title   = {Semantic Detour Flow: Pixel Diffusion that Decides Semantics First},
  author  = {Dao, Quan and Pham, Tuan and Nguyen, Anh and Vu, Duc and Tran, Quyen
             and Mandt, Stephan and Metaxas, Dimitris},
  year    = {2026}
}

Acknowledgements

The backbone, the pixel-space baseline and the FID protocol follow JiT β€” Back to Basics: Let Denoising Generative Models Denoise, Tianhong Li and Kaiming He (arXiv:2511.13720, github.com/LTH14/JiT). Released under the MIT licence.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train quandao10/detour-flow

Papers for quandao10/detour-flow