ComfyUI Node

RGBYP Mask Bridge

RGBYP Mask Bridge

By akawana·Created 9 months ago·Updated 7 days ago· 5
RGBYP Mask Bridge
  • image
  • image
  • rgbyp_mask
clear_on_size_changefalse
updater0.7500

RGBYP Load Image is great when your mask target comes off disk. But half the time the image you want to mask doesn't exist as a file yet - it's the output of a VAE decode, a ControlNet preprocessor, an upscale, or a KSampler preview. That's what RGBYP Mask Bridge is for. You feed it any IMAGE tensor from anywhere in the graph, it passes the image straight through, and lets you paint an RGBYP five-color mask directly on it. Out the other side you get the image plus a clean rgbyp_mask - no temp file juggling on your end.

The one widget that matters

The inputs are image, clear_on_size_change, and the ever-present updater (internal editor logic - leave it alone, per the README).

clear_on_size_change is the setting you actually think about. Its default is false, and the author recommends you keep it there. What it does: when the input image resolution changes between runs, false means the previous mask survives and gets applied to the new image even if the dimensions differ. true means the mask is destroyed the moment the incoming size changes. The false path is the forgiving one - swap a different image into the same bridge and your region painting stays put, which is exactly what you want when iterating on a composition. Set it to true when you genuinely want a fresh mask per resolution.

There's a Load Mask button on the node too (since v2), so you can pull in a mask you saved earlier - just open the main image first.

Outputs

Two: image, which is your input passed through untouched, and rgbyp_mask, the five-color mask as an IMAGE. From there the usual splitter nodes take over - RGBYP Mask To Regular Masks for five separate MASK outputs, or RGBYP Mask To List for a list.

Note it's an output node, meaning ComfyUI treats it as an endpoint in the graph and will execute it. That's by design - the editor work happens here.

Installing and using it

Same pack, same install: ComfyUI Manager → search RGBYP, or:

cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-RGBYP-Mask-Editor.git

Restart ComfyUI afterwards. No models, no extra dependencies.

Which one do you reach for?

Quick rule of thumb: loading from a file → RGBYP Load Image (it also gives you the path/name helpers for saving). Image computed mid-graph → RGBYP Mask Bridge. If you're not sure, Bridge is the more flexible of the two because it doesn't care where the image came from.

Gotchas

Everything that bites in this pack bites here too. Masks persist through a browser refresh but die on a full ComfyUI restart because they live in temp/ - save with RGBYP Save Mask if you care. Opacity in the editor is preview-only; it doesn't change the saved mask. And the editor is slow on very large inputs - at 13,000×23,000 pixels people have reported it never finishes loading. Resize down, paint, resize the mask back up, which is standard practice anyway.

CategoryAK/RGBYP

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
clear_on_size_changeBOOLEANfalse
updaterFLOAT0.75000.0001–1

Outputs (2)

NameTypeDescription
imageIMAGE
rgbyp_maskIMAGE