diff options
author | Jairo Correa <jn.j41r0@gmail.com> | 2022-10-05 01:28:50 +0000 |
---|---|---|
committer | Jairo Correa <jn.j41r0@gmail.com> | 2022-10-05 01:31:40 +0000 |
commit | 82380d9ac18614c87bebba1b4cfd4b147cc76a18 (patch) | |
tree | 3f6a9159f2e911f50e77dd2e75c181401da68706 /modules/devices.py | |
parent | 1f50971fb8c83c255c2819dd0b3f29a46b74f7d9 (diff) | |
download | stable-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.py | 3 |
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() |