Victarry / stable-dreambooth

Dreambooth implementation based on Stable Diffusion with minimal code.
142 stars 21 forks source link

error whie running train.py #7

Open mohitm1994 opened 2 years ago

mohitm1994 commented 2 years ago

File "train.py", line 206, in train_loop(config, model, noise_scheduler, optimizer, train_dataloader) File "train.py", line 131, in train_loop noisy_latents = noise_scheduler.add_noise(latents, noise, timesteps.cpu().numpy()) File "/HPS/EgofaceTrial/work/anaconda3/envs/stable-diffusion/lib/python3.8/site-packages/diffusers/schedulers/scheduling_ddpm.py", line 303, in add_noise timesteps = timesteps.to(original_samples.device) AttributeError: 'numpy.ndarray' object has no attribute 'to'

Arthur-Lee commented 1 year ago

Need to change to: noisy_latents = noise_scheduler.add_noise(latents, noise, timesteps)