Run garbage collector when switching workflow if needed.

This commit is contained in:
comfyanonymous 2024-11-01 20:25:38 -04:00
parent bd5d8f150f
commit 5c106a0308
1 changed files with 1 additions and 0 deletions

View File

@ -480,6 +480,7 @@ class PromptExecutor:
if self.caches.outputs.get(node_id) is not None:
cached_nodes.append(node_id)
comfy.model_management.cleanup_models_gc()
self.add_message("execution_cached",
{ "nodes": cached_nodes, "prompt_id": prompt_id},
broadcast=False)