aboutsummaryrefslogtreecommitdiffstats
path: root/modules/devices.py
diff options
context:
space:
mode:
authorJairo Correa <jn.j41r0@gmail.com>2022-10-05 01:28:50 +0000
committerJairo Correa <jn.j41r0@gmail.com>2022-10-05 01:31:40 +0000
commit82380d9ac18614c87bebba1b4cfd4b147cc76a18 (patch)
tree3f6a9159f2e911f50e77dd2e75c181401da68706 /modules/devices.py
parent1f50971fb8c83c255c2819dd0b3f29a46b74f7d9 (diff)
downloadstable-diffusion-webui-gfx803-82380d9ac18614c87bebba1b4cfd4b147cc76a18.tar.gz
stable-diffusion-webui-gfx803-82380d9ac18614c87bebba1b4cfd4b147cc76a18.tar.bz2
stable-diffusion-webui-gfx803-82380d9ac18614c87bebba1b4cfd4b147cc76a18.zip
Removing parts no longer needed to fix vram
Diffstat (limited to 'modules/devices.py')
-rw-r--r--modules/devices.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/devices.py b/modules/devices.py
index 6db4e57c..0158b11f 100644
--- a/modules/devices.py
+++ b/modules/devices.py
@@ -1,7 +1,6 @@
import contextlib
import torch
-import gc
from modules import errors
@@ -20,8 +19,8 @@ def get_optimal_device():
return cpu
+
def torch_gc():
- gc.collect()
if torch.cuda.is_available():
torch.cuda.empty_cache()
torch.cuda.ipc_collect()