Spaces:
Build error
Build error
Commit
·
f1d5797
1
Parent(s):
130df34
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def generate(num_images, interpolate):
|
|
| 44 |
with torch.no_grad():
|
| 45 |
zs = zs.to(device)
|
| 46 |
img = G(zs, None, force_fp32=True, noise_mode='const')
|
| 47 |
-
img = (img.permute(2, 3, 1) * 127.5 + 128).clamp(0, 255).to(torch.uint8)
|
| 48 |
return img.cpu().numpy()
|
| 49 |
|
| 50 |
demo = gr.Blocks()
|
|
|
|
| 44 |
with torch.no_grad():
|
| 45 |
zs = zs.to(device)
|
| 46 |
img = G(zs, None, force_fp32=True, noise_mode='const')
|
| 47 |
+
img = (img.permute(0, 2, 3, 1) * 127.5 + 128).clamp(0, 255).to(torch.uint8)
|
| 48 |
return img.cpu().numpy()
|
| 49 |
|
| 50 |
demo = gr.Blocks()
|