Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -10,6 +10,6 @@ def carga_modelo(model_name='ceyda/butterfly_croppe_uniq1K_512',model_version=No
|
|
10 |
def genera(gan, batch_size=1):
|
11 |
with torch.no_grad():
|
12 |
ims = gan.G(torch.randn(batch_size, gan.latent_dim).clamp_(0.0,1.0)*255)
|
13 |
-
ims = ims.permute(0,2,3,1).
|
14 |
return ims
|
15 |
|
|
|
10 |
def genera(gan, batch_size=1):
|
11 |
with torch.no_grad():
|
12 |
ims = gan.G(torch.randn(batch_size, gan.latent_dim).clamp_(0.0,1.0)*255)
|
13 |
+
ims = ims.permute(0,2,3,1).detach().cpu().numpy().astype(np.uint8)
|
14 |
return ims
|
15 |
|