mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-08 20:42:11 +08:00
Empty cache after model unloading for normal vram and lower.
This commit is contained in:
parent
d3f5998218
commit
0ae81c03bb
@ -238,6 +238,8 @@ def unload_model():
|
|||||||
current_loaded_model.model_patches_to(current_loaded_model.offload_device)
|
current_loaded_model.model_patches_to(current_loaded_model.offload_device)
|
||||||
current_loaded_model.unpatch_model()
|
current_loaded_model.unpatch_model()
|
||||||
current_loaded_model = None
|
current_loaded_model = None
|
||||||
|
if vram_state != VRAMState.HIGH_VRAM:
|
||||||
|
soft_empty_cache()
|
||||||
|
|
||||||
if vram_state != VRAMState.HIGH_VRAM:
|
if vram_state != VRAMState.HIGH_VRAM:
|
||||||
if len(current_gpu_controlnets) > 0:
|
if len(current_gpu_controlnets) > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user