Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -175,7 +175,7 @@ def generate(segment, image, prompt, size, guidance_scale, num_inference_steps,
|
|
175 |
|
176 |
noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
|
177 |
noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
|
178 |
-
latents =
|
179 |
intermediate_latents_cpu = latents.detach().cpu()
|
180 |
if segment==8:
|
181 |
pipe.vae.to("cuda")
|
|
|
175 |
|
176 |
noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
|
177 |
noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
|
178 |
+
latents = pipe.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
|
179 |
intermediate_latents_cpu = latents.detach().cpu()
|
180 |
if segment==8:
|
181 |
pipe.vae.to("cuda")
|