Extensions/comfyui-momo-nodes
ComfyUI Extension

comfyui-momo-nodes

Custom nodes for ComfyUI by Momo.

By PhykrexΒ·Created 5 months agoΒ·Updated 18 days agoΒ· 1
Phykrex/ComfyUI-Momo-Nodes
Nodes5
On cloudLocal install
CategoryMomoNodes/conditioning, MomoNodes/region
Stars1
Updated18 days ago
Readme

🎨 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 ✏️

<img width="993" height="1046" alt="image" src="https://github.com/user-attachments/assets/215f3cba-e225-4bf1-8f42-a1578d5511d5" />

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 πŸ”€

<img width="762" height="1100" alt="image" src="https://github.com/user-attachments/assets/0635d6a6-412f-47da-8db4-43da1300caa0" />

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 full image (for compare), x / y / width / height, per-region prompt / prompt_2…, and a region bundle (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 region bundle (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 mask to 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) 🎭

<img width="561" height="611" alt="image" src="https://github.com/user-attachments/assets/545a36e9-1211-4fdc-9843-ed76fcb3c0fd" />

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_strength and set_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
  1. Add RGB Mask Editor node, set width/height/background color
  2. Click 🎨 Open RGB Mask Editor to launch the visual editor
  3. Draw shapes with different colors for different regions
  4. Apply & Close to save
  5. Connect to RGB Mask Splitter to extract individual masks per color
  6. Feed each mask together with its own positive/negative conditioning into Conditioning Mask Combine (dynamic) β€” new triplets appear as you connect
  7. Pipe the combined positive/negative into your KSampler

Region variation workflow

Region Select βœ‚οΈ β†’ (your sampler / edit model) β†’ Region Stitch 🧩 β†’ Save Image
                 └──────────────── region β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Add Region Select, load or connect an image, set width / height and num_regions
  2. Drag each region box; click one to edit its prompt
  3. Send each crop (+ prompt) through your own sampler to get a variant
  4. Feed the region bundle and each variant into Region Stitch to reassemble the image

License

MIT