- rgbyp_mask
- rgbyp_mask
The RGBYP editor's dirty secret is also its one real gotcha: your painted masks live in ComfyUI's temp/ folder, and ComfyUI wipes that folder on every restart. Browser refresh? Your mask survives. Full restart? Gone. RGBYP Save Mask is the fix - it writes the mask out as a PNG so you can load it back next session, or on a completely different day.
It's not a complicated node. rgbyp_mask goes in, a PNG lands on disk, and the image passes through the output unchanged so you can keep the rest of your graph wired without breaking the chain.
The inputs that matter
rgbyp_mask- the five-color mask IMAGE from RGBYP Load Image or RGBYP Mask Bridge. The actual payload.file_pathandfile_name- strings that come straight from RGBYP Load Image'sfile_path(directory) andfile_name(base name) outputs. Wire those two and your mask gets saved next to the image you painted it on. Leave them empty and it falls back to saving intoinput/rgbyp_masks/with the namemask.add_postfix(default true) - appends_rgbyp_maskto the saved filename so it can't be confused with the source image.override(default true) - true means "overwrite the last mask"; false means "keep every version, incrementing 01, 02 … 99" as a crude version history.
How it saves
The node writes a PNG, preserving the alpha channel when the mask has one - the README's advice is that any mask saver works here since "it is just an image," but remember to save with alpha if you want a clean editable mask. Two small touches: it quietly refuses to write a fully-black mask (saves you a folder full of nothing), and it saves only the first batch item, so this isn't a batch saver.
The workflow that makes it useful
- Paint your mask with RGBYP Load Image.
- Wire
file_pathandfile_nameinto RGBYP Save Mask. - Run once. The mask now sits next to your source image.
- Next session, reopen the image in RGBYP Load Image and use its Load Mask button to pull the saved mask back in.
That's the entire persistence story for this pack, and it's genuinely painless - the pair is designed around each other.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-RGBYP-Mask-Editor.git
then restart ComfyUI, or ComfyUI Manager → search RGBYP. No models, no extra dependencies.
The honest caveat
file_path comes from RGBYP Load Image, and that node's path detection only works reliably inside the input folder - same-named files in different subfolders can resolve to the wrong directory. If your saves land somewhere odd, that's the cause. And since it's just a PNG, don't feel locked in: any image-save node does the same job. This one just wires up to the pack's helpers without any assembly required.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| rgbyp_mask | IMAGE | — | |
| file_path | STRING | — | |
| file_name | STRING | — | |
| add_postfix | BOOLEAN | true | — |
| override | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| rgbyp_mask | IMAGE | — |