IceClear / StableSR

[IJCV2024] Exploiting Diffusion Prior for Real-World Image Super-Resolution
https://iceclear.github.io/projects/stablesr/
Other
2.18k stars 140 forks source link

Test output is black #133

Open ZH3nGsQ opened 5 months ago

ZH3nGsQ commented 5 months ago

I want to test StableSR using your test_example, the result is a black image. I download pretrained_SDmodel v2-1_512-ema-pruned.ckpt ,pretrained_CFWmodel vqgan_cfw_00011.ckpt and stablesr_000117.ckpt. And I run the code python scripts/sr_val_ddpm_text_T_vqganfin_oldcanvas_tile.py --config configs/stableSRNew/v2-finetune_text_T_512.yaml --ckpt pretrained_turbo/stablesr_000117.ckpt --init-img inputs/test_example --outdir OUT_PATH --ddpm_steps 4 --dec_w 0.5 --seed 42 --n_samples 1 --vqgan_ckpt pretrained_CFWmodel/vqgan_cfw_00011.ckpt --colorfix_type wavelet --upscale 1 The input is 720720 image The output is also 720720 but black image I don't know which part went wrong.

ZH3nGsQ commented 5 months ago

I changed ckpt_path to pretrained_SDmodel/v2-1_512-ema-pruned.ckpt in v2-finetune_text_T_512.yaml

IceClear commented 5 months ago

Hi. I did not meet such a problem. You may check if the output is None. If so, you may need to avoid using autocasting for the autoencoder part. This is not very common.