Huertas97 commited on
Commit
b1d7f45
1 Parent(s): 172fd13

Fix: full denoising teimsteps

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -104,7 +104,7 @@ def generate_images(selected_class, num_images, progress=gr.Progress()):
104
  x = torch.randn(num_images, 1, 28, 28).to(device)
105
  y = torch.tensor([class_idx] * num_images).to(device)
106
 
107
- for t in progress.tqdm(range(2), desc="Generating image", total=noise_scheduler.config.num_train_timesteps): #
108
  with torch.no_grad():
109
  residual = model_classcond_native(x, t, y)
110
  x = noise_scheduler.step(residual, t, x).prev_sample
 
104
  x = torch.randn(num_images, 1, 28, 28).to(device)
105
  y = torch.tensor([class_idx] * num_images).to(device)
106
 
107
+ for t in progress.tqdm(noise_scheduler.timesteps, desc="Generating image", total=noise_scheduler.config.num_train_timesteps): #
108
  with torch.no_grad():
109
  residual = model_classcond_native(x, t, y)
110
  x = noise_scheduler.step(residual, t, x).prev_sample