eienmojiki commited on
Commit
69d7a81
·
verified ·
1 Parent(s): 3a6712a

Update utils/t2i.py

Browse files
Files changed (1) hide show
  1. utils/t2i.py +1 -0
utils/t2i.py CHANGED
@@ -63,5 +63,6 @@ def t2i_gen(
63
  x = x.clamp(0, 1)
64
  x = x.permute(0, 2, 3, 1)
65
  img = Image.fromarray((x*255).float().cpu().numpy().astype(np.uint8)[0])
 
66
 
67
  return img
 
63
  x = x.clamp(0, 1)
64
  x = x.permute(0, 2, 3, 1)
65
  img = Image.fromarray((x*255).float().cpu().numpy().astype(np.uint8)[0])
66
+ torch.cuda.empty_cache()
67
 
68
  return img