Spaces:
Runtime error
Runtime error
Update utils/t2i.py
Browse files- 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
|