mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-04 23:37:31 +00:00
[PR #2839] [CLOSED] Add ComfyUI-PipelineBarrier to custom node list #2821
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI-Manager#2821
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/2839
Author: @brosequist
Created: 4/29/2026
Status: ❌ Closed
Base:
main← Head:add/comfyui-pipeline-barrier📝 Commits (1)
a888b27Add ComfyUI-PipelineBarrier to custom node list📊 Changes
1 file changed (+829 additions, -508 deletions)
View changed files
📝
custom-node-list.json(+829 -508)📄 Description
New Node: ComfyUI-PipelineBarrier
Repository: https://github.com/brosequist/ComfyUI-PipelineBarrier
Description: A single node that flushes PyTorch's GPU memory cache and runs garbage collection between pipeline stages, preventing OOM errors in multi-stage workflows such as two-pass video generation.
What it does
Calls
soft_empty_cache(force=True),gc.collect(),torch.cuda.empty_cache(), andtorch.cuda.synchronize()on every visible GPU. Accepts a LATENT input and returns it unchanged — it is a pure synchronization point with no effect on tensor values.Why it's useful
Long multi-stage workflows (e.g. WanVideo two-pass I2V with BlockSwap) can OOM at the start of a second stage even after a model has been offloaded, because PyTorch's allocator caches freed blocks rather than returning them to the OS immediately. Placing this node between stages ensures caches are flushed before the next stage begins.
Checklist
NODE_CLASS_MAPPINGSandNODE_DISPLAY_NAME_MAPPINGSexported from__init__.py🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.