- Pytorch == 1.12.1
- CUDA == 11.7
- pytorch-lightning==1.4.2
- xformers == 0.0.16 (Optional)
- Other required packages in
environment.yaml
# Create a conda environment and activate it
conda env create --file environment.yaml
conda activate structsr
# Install xformers
conda install xformers -c xformers/label/dev
# Install taming & clip
pip install -e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
pip install -e git+https://github.com/openai/CLIP.git@main#egg=clip
pip install -e .
Download the baseline models from [Google Driver].
python scripts/StructSR.py --config configs/stableSRNew/v2-finetune_text_T_512.yaml --ckpt CKPT_PATH --vqgan_ckpt VQGANCKPT_PATH --init-img INPUT_PATH --outdir OUT_DIR --ddpm_steps 200 --dec_w 0.5 --colorfix_type adain --lamda 0.3
lamda: Used for control the timesteps of $T_{SAS}$
Please cite us if our work is useful for your research.
@article{li2025structsr,
title={StructSR: Refuse Spurious Details in Real-World Image Super-Resolution},
author={Li, Yachao and Liang, Dong and Ding, Tianyu and Huang, Sheng-Jun},
journal={arXiv preprint arXiv:2501.05777},
year={2025}
}
This project is licensed under MIT License. Redistribution and use should follow this license.
This project is based on stablediffusion, latent-diffusion, SPADE, mixture-of-diffusers, BasicSR and StructSR. Thanks for their awesome work.
If you have any questions, please feel free to reach me out at li509383050@gmail.com
.