RGBYP Mask To Regular Masks
RGBYP Mask To Regular Masks
- rgbyp_mask
- red_mask
- green_mask
- blue_mask
- yellow_mask
- pink_mask
- combined_mask
This is the workhorse of the RGBYP pack - the node that turns your painted five-color image into masks ComfyUI can actually do something with. You've painted red around character one, yellow around character two, blue across the background. The editor stored that as one RGB image with five distinct colors. RGBYP Mask To Regular Masks reads it and spits out six separate MASK tensors: red_mask, green_mask, blue_mask, yellow_mask, pink_mask, and a bonus combined_mask.
The single rgbyp_mask output from RGBYP Load Image or RGBYP Mask Bridge goes in; six real masks come out. From there the masks feed standard things: Conditioning (Set Mask) for regional prompting, inpaint workflows, ControlNet masks, whatever takes a MASK.
How it splits
The mechanism is dead simple and it's worth knowing because it tells you what the editor has to produce. Each color is matched by its RGB signature - red is (1,0,0), green (0,1,0), blue (0,0,1), yellow (1,1,0), pink (1,0,1) - using a 0.5 threshold per channel. Every pixel lands in exactly one mask as a 1.0 (white). That's why the author is so insistent you use the RGBYP loader rather than a stock Load Image: if strokes get baked into the image with antialiased edges or opacity, the threshold split gets smeared.
A couple of quiet details that save you pain: any mask that comes out completely black is replaced with a 64×64 black placeholder instead of being dropped, so downstream nodes never hit an undefined mask. And strengths from the RGBYP Mask Strength node are honored as multipliers - so a mask at strength 0.5 comes out as 0.5 gray, not 1.0 white.
The inputs that matter
rgbyp_mask- the five-color IMAGE from the loader or bridge. The one required thing.own_strength_in_combined- defaultfalse. When false,combined_maskis the sum of all five regions multiplied by one sharedcombined_strength. Flip it to true and the combined mask uses each color's own strength instead. Pick one; they're two ways of weighting the combined output.grow_strengthandblur_strength- integers, default 0. The same grow+blur that the standalone Mask Grow Blur node does, applied to every output mask. Handy for feathering your regions in the same step as splitting, so you don't need a GrowMask node hanging off each of the six outputs.strength_settings(optional) - the JSON string output from RGBYP Mask Strength. Wire it up and the split respects the strengths you set centrally instead of the defaults.
The outputs
Five per-color masks plus combined_mask. The combined one is the sleeper hit: a single mask where each region carries a different gray value, which is exactly the input Differential Diffusion-style workflows want.
Install & one-liners
It ships in the RGBYP pack, so install is ComfyUI Manager → search RGBYP, or:
cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-RGBYP-Mask-Editor.git
Restart ComfyUI. No models, no extra pip packages.
Worth remembering: this is the rich splitter. If you need exactly the five masks as a list and none of the grow/blur/combined extras, RGBYP Mask To List is the lighter alternative.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| rgbyp_mask | IMAGE | — | |
| own_strength_in_combined | BOOLEAN | false | — |
| grow_strength | INT | 0 | — |
| blur_strength | INT | 0 | — |
| strength_settingsopt | STRING | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| red_mask | MASK | — |
| green_mask | MASK | — |
| blue_mask | MASK | — |
| yellow_mask | MASK | — |
| pink_mask | MASK | — |
| combined_mask | MASK | — |