Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -195,7 +195,8 @@ def compose_language_descriptions(prompt, guidance_scale):
|
|
195 |
|
196 |
out_img = upsamples[0].permute(1,2,0)
|
197 |
out_img = (out_img+1)/2
|
198 |
-
out_img =
|
|
|
199 |
return out_img
|
200 |
|
201 |
# create model for CLEVR Objects
|
@@ -269,7 +270,8 @@ def compose_clevr_objects(prompt, guidance_scale):
|
|
269 |
samples = sample(coordinates)
|
270 |
out_img = samples[0].permute(1,2,0)
|
271 |
out_img = (out_img+1)/2
|
272 |
-
out_img =
|
|
|
273 |
return out_img
|
274 |
|
275 |
|
|
|
195 |
|
196 |
out_img = upsamples[0].permute(1,2,0)
|
197 |
out_img = (out_img+1)/2
|
198 |
+
out_img = (out_img.detach().cpu() * 255.).to(torch.uint8)
|
199 |
+
out_img = out_img.numpy()
|
200 |
return out_img
|
201 |
|
202 |
# create model for CLEVR Objects
|
|
|
270 |
samples = sample(coordinates)
|
271 |
out_img = samples[0].permute(1,2,0)
|
272 |
out_img = (out_img+1)/2
|
273 |
+
out_img = (out_img.detach().cpu() * 255.).to(torch.uint8)
|
274 |
+
out_img = out_img.numpy()
|
275 |
return out_img
|
276 |
|
277 |
|