mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-23 15:38:17 -08:00
Removing parts no longer needed to fix vram
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user