From 6a8a99fcb44e1eb412c4974e45ef3791df596391 Mon Sep 17 00:00:00 2001 From: FearL0rd Date: Wed, 4 Feb 2026 16:24:57 -0600 Subject: [PATCH] Added VRAM purge toggles Added VRAM purge toggles to INPUT_TYPES: purge_cache: Clears CUDA cache during cleanup (default: True) purge_models: Aggressively unloads all models from VRAM using comfy.model_management.unload_all_models() (default: False) Updated setup_parallel method signature to accept purge_cache and purge_models parameters Store purge preferences on the model: target_model._parallel_purge_cache and target_model._parallel_purge_models Enhanced cleanup_parallel_model function to: Read the purge flags from the model attributes Conditionally run comfy.model_management.unload_all_models() if purge_models is True Conditionally clear CUDA cache and soft empty cache based on purge_cache setting Multi-GPU cache clearing (iterates through all CUDA devices) The purge settings persist with the model and are applied when the parallel processing resources are cleaned up (either when the node is re-run with new settings or when the model is garbage collected). --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3a8c617..dc8931d 100644 --- a/README.md +++ b/README.md @@ -21,16 +21,17 @@ This suite of nodes unlocks high-performance parallel processing in ComfyUI by u ### 1. Parallel Anything (True Multi-GPU) The main orchestration node. It intercepts the diffusion model's forward pass and triggers simultaneous compute kernels across all available replicas. -image +image + ### 2. Parallel Device Config / List Allows you to build a `DEVICE_CHAIN`. You can chain multiple GPUs together or use the List node to quickly and their respective workload percentages. - Option 1 -image +image - Option 2 -image +image - Console image