idlebg commited on
Commit
b83ecf4
1 Parent(s): 79997ae

After generating the images, clear the GPU cache

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -217,8 +217,10 @@ def generate(
217
  with open(f"{filename}.txt", "w") as f:
218
  f.write(prompt)
219
 
220
- return output_images # return the list of image objects
 
221
 
 
222
 
223
 
224
 
 
217
  with open(f"{filename}.txt", "w") as f:
218
  f.write(prompt)
219
 
220
+ # After generating the images, clear the GPU cache
221
+ torch.cuda.empty_cache()
222
 
223
+ return output_images # return the list of image objects
224
 
225
 
226