†Equal Contribution, *Corresponding Authors
Jingkai Wang†, Yixin Tang†, Jue Gong, Jiatong Li, Shu Li, Libo Liu, Jianliang Lan, Yutong Liu*, Yulun Zhang*, "Spectral and Trajectory Regularization for Diffusion Transformer Super-Resolution", ECCV, 2026
- 2026-07-20 Models and code are released.
- 2026-06-17 Congratulations! StrSR has been accepted to ECCV 2026. See you in Malmö 🇸🇪🇸🇪🇸🇪
- 2026-03-06: This repo is released.
⭐⭐⭐ If StrSR is helpful to your projects, please help star this repo. Thanks!
Abstract: Diffusion transformer (DiT) architectures show great potential for real-world image super-resolution (Real-ISR). However, their computationally expensive iterative sampling necessitates one-step distillation. Existing one-step distillation methods struggle with Real-ISR on DiT. They suffer from fundamental trajectory mismatch and generate severe grid-like periodic artifacts. To tackle these challenges, we propose StrSR, a novel one-step adversarial distillation framework featuring spectral and trajectory regularization. Specifically, we propose an asymmetric discriminative distillation architecture to bridge the trajectory gap. Additionally, we design a frequency distribution matching strategy to effectively suppress DiT-specific periodic artifacts caused by high-frequency spectral leakage. Experiments demonstrate that StrSR achieves state-of-the-art performance in Real-ISR, across both quantitative metrics and visual perception.
- Environment
- Training
- Datasets
- Models
- Inference
- Results
- Citation
- License and Third-Party Notices
- Acknowledgements
- Create conda environment with Python 3.10. (
conda create -n strsr python=3.10) - Install PyTorch 2.6.0. (
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124) - Install
requirements.txt. (pip install -r requirements.txt) - Install
pyiqaseparately with--no-deps. (pip install --no-deps pyiqa==0.1.15.post2) - Install
flash-attn. (pip install flash-attn==2.7.4.post1 --no-build-isolation)
-
Download the training datasets and pretrained models described below.
-
Update the dataset and model paths in the stage 1 and stage 2 configuration files for the model you want to train:
- FLUX:
configs/flux_train_stage1.yamlandconfigs/flux_train_stage2.yaml - Z-Image:
configs/zimage_train_stage1.yamlandconfigs/zimage_train_stage2.yaml
- FLUX:
-
Run both training stages in order. Stage 2 resumes from the final stage 1 checkpoint (
checkpoint-40000) and continues training until step 60000. Run the commands from the repository root.
The stage 2 configurations already set resume_from_checkpoint to exps/flux_s1/checkpoint-40000 and exps/zimage_s1/checkpoint-40000, respectively. The corresponding stage 1 configurations start without a checkpoint.
FLUX:
# Stage 1: steps 1-40000. train.sh is a shortcut for this command.
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
accelerate launch --mixed_precision=bf16 train.py \
--config configs/flux_train_stage1.yaml
# Stage 2: resume from exps/flux_s1/checkpoint-40000 and continue to step 60000.
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
accelerate launch --mixed_precision=bf16 train.py \
--config configs/flux_train_stage2.yamlZ-Image:
# Stage 1: steps 1-40000.
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
accelerate launch --mixed_precision=bf16 train.py \
--config configs/zimage_train_stage1.yaml
# Stage 2: resume from exps/zimage_s1/checkpoint-40000 and continue to step 60000.
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
accelerate launch --mixed_precision=bf16 train.py \
--config configs/zimage_train_stage2.yamlTraining Dataset:
Testing Dataset:
- DIV2K-val (Agustsson & Timofte, CVPRW NTIRE 2017)
- RealSR (Cai et al., ICCV 2019)
- RealLQ250 (Ai et al., NeurIPS 2024)
We have put all the test data in testdata/ in Hugging Face repository.
Download Z-Image-Turbo, FLUX.2-klein-base-4B, Qwen3-VL-4B-Instruct, and CLIP-convnext_xxlarge-laion2B-s34B-b82K-augreg-soup. Please refer to the Hugging Face repository for the StrSR checkpoints and organize all models as follows:
pretrained
├── CLIP-convnext_xxlarge-laion2B-s34B-b82K-augreg-soup
│ └── ...
├── FLUX.2-klein-base-4B
│ └── ...
├── Qwen3-VL-4B-Instruct
│ └── ...
├── Z-Image-Turbo
│ └── ...
├── StrSR-flux
│ ├── projector.pth
│ └── state_dict.pth
└── StrSR-zimage
├── projector.pth
└── state_dict.pth
GPU VRAM >= 40 GB.
Run the inference wrappers with Bash:
bash test_zimage.sh
bash test_flux.shThe wrappers use Qwen3-VL conditioning by default. To use a user-provided text
prompt instead, select the text conditioning mode and pass --prompt:
bash test_zimage.sh --conditioning txt --prompt "a highly detailed realistic image"
bash test_flux.sh --conditioning txt --prompt "a highly detailed realistic image"We achieved state-of-the-art performance on synthetic and real-world datasets.
Quantitative Comparisons (click to expand)
Visual Comparisons (click to expand)
If you find the code helpful in your research or work, please cite the following paper(s).
@inproceedings{wang2026strsr,
title={Spectral and Trajectory Regularization for Diffusion Transformer Super-Resolution},
author={Jingkai Wang and Yixin Tang and Jue Gong and Jiatong Li and Shu Li and Libo Liu and Jianliang Lan and Yutong Liu and Yulun Zhang},
booktitle={European Conference on Computer Vision},
year={2026}
}
StrSR is built on and includes/adapts code from HYPIR. Please read and comply with HYPIR's Non-Commercial Use Only Declaration. The HYPIR attribution and those restrictions apply to the HYPIR-derived portions of this repository.
This code is built on HYPIR. Thanks to LSDIR and Aesthetic-4K for the dataset.