eienmojiki commited on
Commit
ed7a499
1 Parent(s): 99e90f5

Update gui.py

Browse files
Files changed (1) hide show
  1. gui.py +4 -0
gui.py CHANGED
@@ -1,4 +1,5 @@
1
  import spaces
 
2
  import os
3
  import torch
4
  import logging
@@ -438,3 +439,6 @@ class GuiSD:
438
  if msg_lora:
439
  info_state = info_state + "<br>" + "<br>".join(msg_lora)
440
  yield img, info_state
 
 
 
 
1
  import spaces
2
+ import gc
3
  import os
4
  import torch
5
  import logging
 
439
  if msg_lora:
440
  info_state = info_state + "<br>" + "<br>".join(msg_lora)
441
  yield img, info_state
442
+
443
+ torch.cuda.empty_cache()
444
+ gc.collect()