VSehwag / minimal-diffusion

A minimal yet resourceful implementation of diffusion models (along with pretrained models + synthetic images for nine datasets)
MIT License
257 stars 39 forks source link

IndexError: tensors used as indices must be long, byte or bool tensors #4

Open williamlzw opened 10 months ago

williamlzw commented 10 months ago

File "E:\minimal-diffusion-main\main_single.py", line 38, in / unsqueeze3x(scalars.alpha_bar[t].sqrt()) IndexError: tensors used as indices must be long, byte or bool tensors

self.get_x0_from_xt_eps = lambda xt, eps, t, scalars: ( self.clamp_x0( 1 / unsqueeze3x(scalars.alpha_bar[t].sqrt())