Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
ab7dbdb
1
Parent(s):
0eb90c8
hf cuda issue
Browse files
app.py
CHANGED
@@ -765,7 +765,7 @@ def ready_sample(img_cropped, img_original, ex_mask, inpaint_mask, keypts, keypt
|
|
765 |
target_size=opts.image_size,
|
766 |
latent_size=opts.latent_size,
|
767 |
)
|
768 |
-
latent = opts.latent_scaling_factor * autoencoder.encode(image.cuda()).sample()
|
769 |
target_cond = torch.cat([heatmaps, torch.zeros_like(mask)], 1)
|
770 |
ref_cond = torch.cat([latent, heatmaps, mask], 1)
|
771 |
ref_cond = torch.zeros_like(ref_cond)
|
|
|
765 |
target_size=opts.image_size,
|
766 |
latent_size=opts.latent_size,
|
767 |
)
|
768 |
+
latent = opts.latent_scaling_factor * autoencoder.encode(image.cuda()).sample().to(pre_device)
|
769 |
target_cond = torch.cat([heatmaps, torch.zeros_like(mask)], 1)
|
770 |
ref_cond = torch.cat([latent, heatmaps, mask], 1)
|
771 |
ref_cond = torch.zeros_like(ref_cond)
|