yuanzhi-zhu / DiffPIR

"Denoising Diffusion Models for Plug-and-Play Image Restoration", Yuanzhi Zhu, Kai Zhang, Jingyun Liang, Jiezhang Cao, Bihan Wen, Radu Timofte, Luc Van Gool.
https://yuanzhi-zhu.github.io/DiffPIR/
MIT License
337 stars 25 forks source link

Batch-wise inference (multiple images in parallel) support #19

Open YuQiao0303 opened 9 months ago

YuQiao0303 commented 9 months ago

Hi authors, thank you for this amazing work! I notice that in 'main_ddpir_inpainting.py', there is a for loop that deal with one image at a time. If we have a lot of images to deal with, this may be relatively slow. I wonder if it's possible to process multiple images as a minibatch in parallel? Thank you!!

yuanzhi-zhu commented 9 months ago

Hi @YuQiao0303 ,

Thanks for your interest, could you please try e.g. python main_ddpir.py --opt configs/inpaint.yaml in the latest updated repository? You can try to change the batch size in the config file inpaint.yaml :)