Commit 0ae81c03 authored by comfyanonymous's avatar comfyanonymous
Browse files

Empty cache after model unloading for normal vram and lower.

parent d3f59982
...@@ -238,6 +238,8 @@ def unload_model(): ...@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment