1inkusFace commited on
Commit
2c2e0dd
·
verified ·
1 Parent(s): f92550b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -330,7 +330,7 @@ def generate_images_60(prompt, neg_prompt_1, neg_prompt_2, neg_prompt_3, width,
330
  ).images
331
 
332
  # 2. Manually decode with our float32 VAE
333
- latents_fp32 = latents.to(torch.float32)
334
  latents_fp32 = 1 / pipe.vae.config.scaling_factor * latents_fp32
335
  with torch.no_grad():
336
  # This is our high-precision sRGB tensor in range [-1, 1]
@@ -391,7 +391,7 @@ def generate_images_110(prompt, neg_prompt_1, neg_prompt_2, neg_prompt_3, width,
391
  ).images
392
 
393
  # 2. Manually decode with our float32 VAE
394
- latents_fp32 = latents.to(torch.float32)
395
  latents_fp32 = 1 / pipe.vae.config.scaling_factor * latents_fp32
396
  with torch.no_grad():
397
  # This is our high-precision sRGB tensor in range [-1, 1]
 
330
  ).images
331
 
332
  # 2. Manually decode with our float32 VAE
333
+ latents_fp32 = sd_image.to(torch.float32)
334
  latents_fp32 = 1 / pipe.vae.config.scaling_factor * latents_fp32
335
  with torch.no_grad():
336
  # This is our high-precision sRGB tensor in range [-1, 1]
 
391
  ).images
392
 
393
  # 2. Manually decode with our float32 VAE
394
+ latents_fp32 = sd_image.to(torch.float32)
395
  latents_fp32 = 1 / pipe.vae.config.scaling_factor * latents_fp32
396
  with torch.no_grad():
397
  # This is our high-precision sRGB tensor in range [-1, 1]