XPixelGroup / DiffBIR

Official codes of DiffBIR: Towards Blind Image Restoration with Generative Diffusion Prior
Apache License 2.0
3.31k stars 279 forks source link

set w/o restoration module #104

Open lijain opened 7 months ago

lijain commented 7 months ago

DIffbir How to set up w/o restoration module training

0x3f3f3f3fun commented 6 months ago

In our latest code, to train w/o restoration module, you just need to remove a few lines of code (as shown below): https://github.com/XPixelGroup/DiffBIR/blob/e7974cbe899e83bddd392a9a7ea0356b8fb529eb/train_stage2.py#L80-L89 https://github.com/XPixelGroup/DiffBIR/blob/e7974cbe899e83bddd392a9a7ea0356b8fb529eb/train_stage2.py#L108 https://github.com/XPixelGroup/DiffBIR/blob/e7974cbe899e83bddd392a9a7ea0356b8fb529eb/train_stage2.py#L131 and directly use lq as condition:

cond = pure_cldm.prepare_condition(clean, prompt) => cond = pure_cldm.prepare_condition(lq, prompt)