JuliaWolleb / Diffusion-based-Segmentation

This is the official Pytorch implementation of the paper "Diffusion Models for Implicit Image Segmentation Ensembles".
MIT License
271 stars 35 forks source link

Clarification for `ddim_sample_loop_known` #67

Open bennymi opened 2 months ago

bennymi commented 2 months ago

Hi, thank you for providing the code. I have a question about the ddim_sample_loop_known function. Why do we set the timesteps in this line (https://github.com/JuliaWolleb/Diffusion-based-Segmentation/blob/676f214035e90edd0357f51feab45841e4aefcfb/guided_diffusion/gaussian_diffusion.py#L792) to be 499?

Shouldn't the SpacedDiffusion model and the timestep_respacing with something like ddim 50 automatically take care of the correct beta scheduling to reduce the number of timesteps?

In the original ddim_sample_loop implementation, there is no such thing: https://github.com/openai/improved-diffusion/blob/1bc7bbbdc414d83d4abf2ad8cc1446dc36c4e4d5/improved_diffusion/gaussian_diffusion.py#L562