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
a252963f
Commit
a252963f
authored
Dec 23, 2023
by
comfyanonymous
Browse files
--disable-smart-memory now unloads everything like it did originally.
parent
36a79531
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
comfy/model_management.py
comfy/model_management.py
+4
-0
execution.py
execution.py
+2
-0
No files found.
comfy/model_management.py
View file @
a252963f
...
...
@@ -754,6 +754,10 @@ def soft_empty_cache(force=False):
torch
.
cuda
.
empty_cache
()
torch
.
cuda
.
ipc_collect
()
def
unload_all_models
():
free_memory
(
1e30
,
get_torch_device
())
def
resolve_lowvram_weight
(
weight
,
model
,
key
):
#TODO: remove
return
weight
...
...
execution.py
View file @
a252963f
...
...
@@ -382,6 +382,8 @@ class PromptExecutor:
for
x
in
executed
:
self
.
old_prompt
[
x
]
=
copy
.
deepcopy
(
prompt
[
x
])
self
.
server
.
last_node_id
=
None
if
comfy
.
model_management
.
DISABLE_SMART_MEMORY
:
comfy
.
model_management
.
unload_all_models
()
...
...
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