Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -195,7 +195,7 @@ 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 = (out_img.detach().cpu() * 255.).to(
|
199 |
out_img = out_img.numpy()
|
200 |
return out_img
|
201 |
|
@@ -270,7 +270,7 @@ def compose_clevr_objects(prompt, guidance_scale):
|
|
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(
|
274 |
out_img = out_img.numpy()
|
275 |
return out_img
|
276 |
|
|
|
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(th.uint8)
|
199 |
out_img = out_img.numpy()
|
200 |
return out_img
|
201 |
|
|
|
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(th.uint8)
|
274 |
out_img = out_img.numpy()
|
275 |
return out_img
|
276 |
|