Nodes/ComfyUI-YogurtNodes/Save Mask Bridge (Non Output) (Yogurt Nodes)
ComfyUI Node

Save Mask Bridge (Non Output) (Yogurt Nodes)

Mask saver that writes the file and skips the spotlight

By yogurt7771·Created 2 years ago·Updated 9 days ago· 1
Save Mask Bridge (Non Output) (Yogurt Nodes)
  • masks
  • masks
  • width
  • height
  • batch
  • saved_paths
output_dir
filename_prefixComfyUI
disable_metadatafalse
overwritefalse
suffix.png
png_compression4
jpeg_quality100

Save Mask Bridge (Non Output) is the mask version of the pack's "save but don't promote" pattern: it writes your MASK tensor to disk as a grayscale PNG and passes it through the graph, but it isn't registered as an output node, so ComfyUI doesn't treat the save as one of the workflow's headline results.

Why does the distinction matter? Output nodes' results get returned in the API response and show up in the frontend history. When you're driving ComfyUI from code, or running a subworkflow, an intermediate mask suddenly promoted to "output" adds noise to your results. This variant keeps the artifact on disk - saved_paths output tells you exactly where - while the mask itself keeps flowing to the next node like nothing happened. masks, width, height, batch and saved_paths all come out, same as the output-marked version.

The inputs are the full standard set: masks, output_dir (blank → ComfyUI output), filename_prefix (with %date:yyyy-MM-dd% and node-value tokens), disable_metadata, overwrite, suffix (.png/.jpg), png_compression and jpeg_quality.

Where this earns its keep

Any inpainting workflow where you keep a selection artifact for later reuse without wanting it in the results stream. Paint a region, save the mask as a side effect for a future run, and let the current run finish cleanly. Pair it with the pack's Load Mask Path node and you've got a repeatable region library that never clutters your output history.

Install

Same single pack install:

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. Found under Yogurt Nodes → IO.

Gotchas

Two family rules apply. Non-output means no frontend gallery entry - check the output folder or the saved_paths output rather than assuming failure. And overwrite defaults to false, so repeated runs auto-increment the filename; flip it if a fixed path matters. Mask-specific: prefer PNG over JPEG; lossy compression blurs the selection edge and can change which pixels pass your threshold when you load the mask back in.

CategoryYogurtNodes/IO

Inputs (8)

NameTypeDefaultDescription
masksMASKThe masks to save.
output_dirSTRINGThe directory to save the masks to, leave blank to save to the ComfyUI output directory.
filename_prefixSTRINGComfyUIThe 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.
disable_metadataCOMBOfalseDisable saving metadata to the PNG file.
overwriteCOMBOfalseOverwrite existing files.
suffixCOMBO.pngThe file extension to save the masks as.
png_compressionINT40–9The level of compression to use for PNG masks.
jpeg_qualityINT1000–100The quality of the JPEG mask.

Outputs (5)

NameTypeDescription
masksMASK
widthINT
heightINT
batchINT
saved_pathsLIST