Save Mask Bridge (Yogurt Nodes)
The four-knob mask saver
- masks
- masks
- width
- height
- batch
- saved_paths
Save Mask Bridge Simple is the pared-down mask saver in the Yogurt pack: four inputs, no format dropdown, no compression sliders, no metadata toggle. It writes your mask to disk as a PNG and passes it back through the graph, which is the entire value proposition.
Stock ComfyUI has no SaveMask node, so before packs like this one, keeping a copy of a selection meant compositing the mask onto a colored canvas, saving that, and losing the actual single-channel mask data in the process. This node just does the right thing. The masks input takes a MASK tensor (single or batched), and you get masks, width, height, batch and saved_paths on the way out.
The settings that exist:
- output_dir - blank saves to the ComfyUI output directory.
- filename_prefix - base filename,
%date:yyyy-MM-dd%and node-value tokens supported. - overwrite - off by default, so filenames auto-increment.
That's it. PNG output, workflow metadata embedded, counter-suffixed filenames - all the sensible defaults, none of the decisions.
When Simple is the right pick
For the common "save the mask as an artifact" case, Simple is honestly the best version of this node. Fewer widgets on the canvas, nothing to misconfigure, and the defaults match what you'd choose anyway. You reach past it only if you need a different format (use Save Mask Bridge or the Ex variant) or you want to strip the embedded workflow metadata for privacy (that toggle lives on the full version).
Install
The one-install-for-everything rule holds:
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt
Or ComfyUI Manager → ComfyUI-YogurtNodes → install → restart. Look for "Save Mask Bridge Simple" under Yogurt Nodes → IO.
Gotchas
The usual: overwrite=false means repeated runs stack numbered files rather than replacing a fixed name, so flip it if another tool watches a specific path. And since it saves PNG always, you're on the lossless side of the mask-save question - good. If you later load that PNG back in and the mask looks slightly "off," the usual culprit is the reload side treating it as an 8-bit grayscale image, not this node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | The masks to save. | |
| output_dir | STRING | The directory to save the masks to, leave blank to save to the ComfyUI output directory. | |
| filename_prefix | STRING | ComfyUI | The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Mask.width% to include values from nodes. |
| overwrite | COMBO | false | Overwrite existing files. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| masks | MASK | — |
| width | INT | — |
| height | INT | — |
| batch | INT | — |
| saved_paths | LIST | — |