Spaces:
Sleeping
Sleeping
Fix: full denoising teimsteps
Browse files
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(
|
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
|