Spaces:
Sleeping
Sleeping
final_app
Browse files
app.py
CHANGED
@@ -139,7 +139,14 @@ def generate_image(pipe, seed_no, prompts, loss_type, loss_apply=False, progress
|
|
139 |
latents = latents * scheduler.init_noise_sigma
|
140 |
|
141 |
# Diffusion Process
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
# Process the latent model input
|
144 |
latent_model_input = torch.cat([latents] * 2)
|
145 |
sigma = scheduler.sigmas[i]
|
|
|
139 |
latents = latents * scheduler.init_noise_sigma
|
140 |
|
141 |
# Diffusion Process
|
142 |
+
timesteps = scheduler.timesteps
|
143 |
+
progress(0, desc="Generating")
|
144 |
+
|
145 |
+
# Fixed loop - separate the progress tracking from the enumeration
|
146 |
+
for i in range(len(timesteps)):
|
147 |
+
progress((i + 1) / len(timesteps), desc=f"Diffusion step {i+1}/{len(timesteps)}")
|
148 |
+
t = timesteps[i]
|
149 |
+
|
150 |
# Process the latent model input
|
151 |
latent_model_input = torch.cat([latents] * 2)
|
152 |
sigma = scheduler.sigmas[i]
|