[PR #2839] [CLOSED] Add ComfyUI-PipelineBarrier to custom node list #2821

Closed
opened 2026-10-28 21:12:55 +00:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • a888b27 Add 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(), and torch.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 is publicly available on GitHub
  • No pip dependencies beyond what ComfyUI already installs
  • NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS exported from __init__.py

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/2839 **Author:** [@brosequist](https://github.com/brosequist) **Created:** 4/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add/comfyui-pipeline-barrier` --- ### 📝 Commits (1) - [`a888b27`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/a888b27f3d1cfcc281a4caa2cd42ce2e956d4c72) Add ComfyUI-PipelineBarrier to custom node list ### 📊 Changes **1 file changed** (+829 additions, -508 deletions) <details> <summary>View changed files</summary> 📝 `custom-node-list.json` (+829 -508) </details> ### 📄 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()`, and `torch.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 - [x] Node is publicly available on GitHub - [x] No pip dependencies beyond what ComfyUI already installs - [x] `NODE_CLASS_MAPPINGS` and `NODE_DISPLAY_NAME_MAPPINGS` exported from `__init__.py` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-28 21:12:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#2821
No description provided.