Shuang59 commited on
Commit
5219f50
β€’
1 Parent(s): 3f591a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(torch.uint8)
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(torch.uint8)
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