Adding/removing variant_i/mask_i input slots at runtime could orphan link references and throw "No link found in parent graph". The optional inputs are already declared in Python, so they render statically and are read on execution regardless — removing the JS makes the node robust (at the cost of always showing all optional inputs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🎨 ComfyUI-Momo-Nodes
Custom nodes for ComfyUI by Momo.
A growing collection of quality-of-life nodes focused on masking, visual editing, and workflow improvements.
Nodes
RGB Mask Editor ✏️
An interactive visual editor for creating RGB color masks directly inside ComfyUI — with drag-and-drop shape manipulation, rotation, layers, and multiple shape types.
Features:
- Interactive canvas editor with click-drag shape creation
- 9 shape types: rectangle, ellipse, triangle, diamond, pentagon, hexagon, star, arrow, cross
- Move, resize, and rotate shapes with intuitive handles
- Layer system with z-index ordering
- Per-shape color, opacity, rotation controls
- Undo/Redo (Ctrl+Z / Ctrl+Y)
- Keyboard shortcuts (V = Select, R = Rect, E = Ellipse, Del = Delete)
- Shift + rotate for 15° snapping
- Resolution-independent (coordinates stored as percentages)
- Live preview on the node after saving
RGB Mask Splitter 🔀
Companion node that splits an RGB mask image into separate masks by color matching with configurable tolerance. Useful for applying different conditioning/prompts to each color region.
Region Select ✂️
Pick one or more movable rectangular regions on an image and send each one out as a crop — ideal for a "crop a region → regenerate it → paste it back" (inpaint/variation) workflow. Each region carries its own prompt, and everything needed to reassemble the image travels in a single region output.
Features:
- Interactive preview inside the node: drag each region box to position it
- Flexible image source: connect an
image_override, or load a file in the node - Up to 8 regions, added/removed with the
+/−buttons (num_regions) - Shared region size (
width/height); each box is positioned independently - One prompt box that edits the selected region (click a box to select it)
- Outputs:
crop+crop_2…(one per region), the fullimage(for compare),x/y/width/height, per-regionprompt/prompt_2…, and aregionbundle (carries the original image plus every region's coordinates and prompt)
Region Stitch 🧩
Companion node that pastes externally-generated variants back into their original positions. Connect the region bundle from Region Select plus each generated variant, and it composites them onto the original image — no manual coordinates needed.
Features:
- Positions variants automatically from the
regionbundle (matched by number:variant→ region 1,variant_2→ region 2, …) - Variant inputs appear progressively as you connect them
- Feathered blending (
blur) to hide seams; variants are auto-resized to their region - Optional per-region
maskto paste only part of a variant (white = keep variant) — pairs nicely with Impact Pack's Preview Bridge for painting masks on the variant
Conditioning Mask Combine (dynamic) 🎭
Combines multiple (positive, negative, mask) triplets into a single positive/negative conditioning pair — a drop-in replacement for chains of native Conditioning (Set Mask) + Conditioning (Combine) nodes.
Features:
- Dynamic triplets: the node starts with one slot and automatically reveals the next one each time you connect an input (up to 10)
- Per-triplet
mask_strengthandset_cond_area(default/mask bounds) — no shared settings - Incomplete triplets are skipped silently, so unused slots never block the workflow
- Pairs naturally with RGB Mask Splitter for regional prompting
Installation
Manual
cd ComfyUI/custom_nodes/
git clone https://github.com/Phykrex/ComfyUI-Momo-Nodes.git
Restart ComfyUI. No additional dependencies required (uses Pillow, torch, numpy — already included with ComfyUI).
ComfyUI Manager
Search for Momo Nodes in the ComfyUI Manager and install.
Usage
Find all nodes under the MomoNodes/ category in the right-click node menu.
RGB Mask Editor workflow
RGB Mask Editor ✏️ → RGB Mask Splitter 🔀 → Conditioning Mask Combine (dynamic) 🎭 → KSampler
- Add RGB Mask Editor node, set width/height/background color
- Click 🎨 Open RGB Mask Editor to launch the visual editor
- Draw shapes with different colors for different regions
- Apply & Close to save
- Connect to RGB Mask Splitter to extract individual masks per color
- Feed each mask together with its own positive/negative conditioning into Conditioning Mask Combine (dynamic) — new triplets appear as you connect
- Pipe the combined positive/negative into your KSampler
Region variation workflow
Region Select ✂️ → (your sampler / edit model) → Region Stitch 🧩 → Save Image
└──────────────── region ──────────────┘
- Add Region Select, load or connect an image, set
width/heightandnum_regions - Drag each region box; click one to edit its prompt
- Send each
crop(+prompt) through your own sampler to get avariant - Feed the
regionbundle and eachvariantinto Region Stitch to reassemble the image
License
MIT