1inkusFace commited on
Commit
2efc4a3
·
verified ·
1 Parent(s): 5d8910b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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