You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
noise = torch.randn_like(im).to(device)
t = torch.full((im.shape[0],), diffusion_config['num_timesteps']-1, device=device)
#t = torch.randint(0, diffusion_config['num_timesteps'], (im.shape[0],)).to(device)
xt = scheduler.add_noise(im, noise, t)
for i in tqdm(reversed(range(diffusion_config['num_timesteps']))):
# Get prediction of noise
noise_pred = model(xt, torch.as_tensor(i).unsqueeze(0).to(device))
# Use scheduler to get x0 and xt-1
xt, x0_pred = scheduler.sample_prev_timestep(xt, noise, torch.as_tensor(i).to(device))```
I used the xt from the forward process to replace the original random noise, and used the noise added during the forward process to replace the model's output for reverse sampling, in order to validate the reverse sampling process. However, my results are not ideal. Do you have any insights on this
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: