comfyui_friendly_pipe
Flexible pipe nodes for bundling and unbundling multiple connections of any type in ComfyUI
ComfyUI Friendly Pipe
A ComfyUI custom node pack that provides flexible, user-friendly pipe nodes for bundling and unbundling multiple connections of any type.
Features
- Dynamic Slots: Start with 1 slot and add up to 80 slots as needed
- Custom Labels: Name each slot for easy identification
- Type Passthrough: Connected types are preserved through the pipe, maintaining compatibility with typed inputs
- Auto-Sync: Output nodes automatically update to match the connected input node's configuration
- Any Type Support: Works with any ComfyUI data type (STRING, IMAGE, MODEL, CLIP, VAE, CONDITIONING, etc.)
Installation
Option 1: ComfyUI Manager (Recommended)
- Install ComfyUI Manager if you haven't already
- Open ComfyUI and click on "Manager" in the menu
- Click "Install Custom Nodes"
- Search for "Friendly Pipe"
- Click "Install" and restart ComfyUI
Option 2: Clone into custom_nodes
cd ComfyUI/custom_nodes
git clone https://github.com/logicalor/comfyui_friendly_pipe.git
Option 3: Manual Installation
- Download or clone this repository
- Place the
comfyui-friendly-pipefolder in yourComfyUI/custom_nodes/directory - Restart ComfyUI
Nodes
Friendly Pipe In
Bundles multiple inputs into a single pipe output.
Features:
- Add/remove input slots dynamically with the ➕/➖ buttons
- Label each slot with a custom name using the text fields
- Labels are reflected on the input slot names
- All connected data is bundled into a single
FRIENDLY_PIPEoutput
Usage:
- Add the "Friendly Pipe In" node to your workflow
- Click "➕ Add Slot" to add more input slots (up to 80)
- Optionally rename slots using the Label fields
- Connect any node outputs to the input slots
- Connect the
pipeoutput to a "Friendly Pipe Out" node
Friendly Pipe Out
Unpacks a pipe back into individual outputs.
Features:
- Automatically syncs slot count and labels with the connected "Friendly Pipe In" or "Friendly Pipe Edit" node
- Output slot types match the original input types
- Updates dynamically when the source node changes
Usage:
- Add the "Friendly Pipe Out" node to your workflow
- Connect the
pipeinput to a "Friendly Pipe In" or "Friendly Pipe Edit" node's output - The output slots will automatically match the input node's configuration
- Connect the individual outputs to downstream nodes
Friendly Pipe Edit
Extends an existing pipe by adding new slots while preserving the original slots.
Features:
- Takes an existing pipe as input and passes it through with additional slots
- Add/remove additional input slots dynamically with the ➕/➖ buttons
- Label each additional slot with a custom name
- Downstream "Friendly Pipe Out" nodes see all accumulated slots (original + new)
- Can be chained multiple times to progressively add more slots
Usage:
- Add the "Friendly Pipe Edit" node to your workflow
- Connect the
pipeinput to an existing "Friendly Pipe In" or another "Friendly Pipe Edit" node - Click "➕ Add Slot" to add additional input slots
- Optionally rename slots using the Label fields
- Connect node outputs to the new input slots
- Connect the output
pipeto a "Friendly Pipe Out" node or another "Friendly Pipe Edit"
Example Workflows
Basic Pipe
[String Node] ──→ slot_1 (text) ┐
[Image Node] ──→ slot_2 (image) ├──→ [Friendly Pipe In] ──pipe──→ [Friendly Pipe Out] ──→ slot_1 (text) ──→ [Show Text]
[Model Node] ──→ slot_3 (model) ┘ ──→ slot_2 (image) ──→ [Preview Image]
──→ slot_3 (model) ──→ [KSampler]
Extended Pipe with Edit Node
[String Node] ──→ slot_1 ┐
[Image Node] ──→ slot_2 ├──→ [Friendly Pipe In] ──pipe──→ [Friendly Pipe Edit] ──pipe──→ [Friendly Pipe Out]
┘ ↑ ├──→ slot_1 (original)
[VAE Node] ──→ slot_1 (vae) ├──→ slot_2 (original)
[CLIP Node] ──→ slot_2 (clip) ├──→ slot_3 (vae - added)
└──→ slot_4 (clip - added)
Use Cases
- Workflow Organization: Bundle related connections to reduce visual clutter
- Subgraph Interfaces: Create clean input/output interfaces for logical sections of your workflow
- Reusable Templates: Build reusable workflow sections with standardized pipe interfaces
- Dynamic Workflows: Easily add or remove connections without rewiring everything
File Structure
comfyui-friendly-pipe/
├── __init__.py # Node registration and exports
├── friendly_pipe_in.py # FriendlyPipeIn node class
├── friendly_pipe_out.py # FriendlyPipeOut node class
├── friendly_pipe_edit.py # FriendlyPipeEdit node class
├── any_type.py # AnyType class for universal type compatibility
├── js/
│ └── friendly_pipe.js # Frontend JavaScript for dynamic UI
├── pyproject.toml # ComfyUI Manager metadata
└── README.md
Technical Details
Type System
The nodes use a special AnyType class that is compatible with all ComfyUI types. This allows:
- Inputs to accept connections from any node type
- Outputs to connect to any typed input without validation errors
Data Flow
-
Friendly Pipe In collects all connected inputs into a dictionary structure:
{ "slot_count": 3, "slots": {1: <data>, 2: <data>, 3: <data>}, "names": {1: "text", 2: "image", 3: "model"} } -
Friendly Pipe Out unpacks this dictionary back into individual outputs
Frontend Sync
The JavaScript frontend handles:
- Dynamic slot addition/removal using LiteGraph's
addInput()/removeInput()methods - Label synchronization between text widgets and slot labels
- Automatic notification of connected output nodes when configuration changes
- Type tracking for visual feedback
Compatibility
- ComfyUI (latest recommended)
- Works with all standard ComfyUI nodes
- Compatible with most custom node packs
License
MIT License - Feel free to use, modify, and distribute.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Credits
Developed for the ComfyUI community.