mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-10 08:07:13 +00:00
Make unload_all_models account for all devices
This commit is contained in:
parent
b5cccf1325
commit
8be711715c
@ -1272,7 +1272,8 @@ def soft_empty_cache(force=False):
|
||||
torch.cuda.ipc_collect()
|
||||
|
||||
def unload_all_models():
|
||||
free_memory(1e30, get_torch_device())
|
||||
for device in get_all_torch_devices():
|
||||
free_memory(1e30, device)
|
||||
|
||||
def unload_model_and_clones(model: ModelPatcher, unload_additional_models=True, all_devices=False):
|
||||
'Unload only model and its clones - primarily for multigpu cloning purposes.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user