Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -132,7 +132,7 @@ def generate(segment, image, prompt, size, guidance_scale, num_inference_steps,
|
|
132 |
image_latents = pipe.image_latents(
|
133 |
image, 1, size, size, device, torch.float32, num_channels_latents, num_latent_frames
|
134 |
)
|
135 |
-
image_latents = image_latents.to(pipe.transformer.dtype)
|
136 |
pipe.vae.to("cpu")
|
137 |
torch.cuda.empty_cache()
|
138 |
guidance = torch.tensor([guidance_scale] * latents.shape[0], dtype=transformer_dtype, device=device) * 1000.0
|
|
|
132 |
image_latents = pipe.image_latents(
|
133 |
image, 1, size, size, device, torch.float32, num_channels_latents, num_latent_frames
|
134 |
)
|
135 |
+
image_latents = image_latents.to("cuda", pipe.transformer.dtype)
|
136 |
pipe.vae.to("cpu")
|
137 |
torch.cuda.empty_cache()
|
138 |
guidance = torch.tensor([guidance_scale] * latents.shape[0], dtype=transformer_dtype, device=device) * 1000.0
|