Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

error whie running train.py #7

Open
mohitm1994 opened this issue Nov 7, 2022 · 1 comment
Open

error whie running train.py #7

mohitm1994 opened this issue Nov 7, 2022 · 1 comment

Comments

@mohitm1994
Copy link

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants