mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-20 22:47:06 +08:00
Run garbage collector when switching workflow if needed.
This commit is contained in:
parent
bd5d8f150f
commit
5c106a0308
@ -480,6 +480,7 @@ class PromptExecutor:
|
|||||||
if self.caches.outputs.get(node_id) is not None:
|
if self.caches.outputs.get(node_id) is not None:
|
||||||
cached_nodes.append(node_id)
|
cached_nodes.append(node_id)
|
||||||
|
|
||||||
|
comfy.model_management.cleanup_models_gc()
|
||||||
self.add_message("execution_cached",
|
self.add_message("execution_cached",
|
||||||
{ "nodes": cached_nodes, "prompt_id": prompt_id},
|
{ "nodes": cached_nodes, "prompt_id": prompt_id},
|
||||||
broadcast=False)
|
broadcast=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user