TencentARC / T2I-Adapter

T2I-Adapter
3.44k stars 204 forks source link

Non-uniform time step sampling are not implemented in the released code ? #55

Open sharkDDD opened 1 year ago

sharkDDD commented 1 year ago

The paper proposes the non-uniform time step sampling to increase the probability of t falling in the early sampling stage but in the code of the forward method in LatentDiffusion, the time t is generated by t = torch.randint(0, self.num_timesteps, (x.shape[0], ), device=self.device).long(), which is the same as DDPM.

Is there a problem with my understanding or is the technique not used in the code?

Ed-ivan commented 1 year ago

In DDPM.py/ class LatentDiffusion (line 810) get_time_with_schedule () , which is called by adapters/coadapters.py/ CoAdapter which inherits the class LatentDiffusion , specificly in line 115 . I think that may help you.