Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
0ae81c03
"...composable_kernel_onnx.git" did not exist on "aafb5eb18781f1ac9e06a17c3e53d968dd53dcc0"
Commit
0ae81c03
authored
Jul 09, 2023
by
comfyanonymous
Browse files
Empty cache after model unloading for normal vram and lower.
parent
d3f59982
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
comfy/model_management.py
comfy/model_management.py
+2
-0
No files found.
comfy/model_management.py
View file @
0ae81c03
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment