nyanko7 commited on
Commit
1831286
1 Parent(s): e521f4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -780,7 +780,7 @@ def generate_image(
780
  init_image = init_image[..., : 16 * (h // 16), : 16 * (w // 16)]
781
  height = init_image.shape[-2]
782
  width = init_image.shape[-1]
783
- init_image = ae.encode(init_image.to(torch_device)).latent_dist.sample()
784
  init_image = (init_image - ae.config.shift_factor) * ae.config.scaling_factor
785
 
786
  generator = torch.Generator(device=device).manual_seed(seed)
 
780
  init_image = init_image[..., : 16 * (h // 16), : 16 * (w // 16)]
781
  height = init_image.shape[-2]
782
  width = init_image.shape[-1]
783
+ init_image = ae.encode(init_image.to(torch_device).to(torch.bfloat16)).latent_dist.sample()
784
  init_image = (init_image - ae.config.shift_factor) * ae.config.scaling_factor
785
 
786
  generator = torch.Generator(device=device).manual_seed(seed)