Nodes/SAX Bridge/SAX Output
ComfyUI Node

SAX Output

The last node on the graph — SAX Output and the save=False habit

By so16tm·Created 6 months ago·Updated 3 months ago· 0
SAX Output
  • pipe
  • image
  • IMAGE
savetrue
output_dir{date:%Y-%m-%d}
filename_template{datetime:%Y%m%d_%H%M%S}
filename_index1
index_digits3
index_position
format
webp_quality90
webp_losslessfalse
prompt_text

SAX Output is the terminal node of the SAX_Bridge pipeline, and its best feature is a lie you want to believe: set save=False and the node does almost nothing except preview, which is exactly what you want while you're iterating. It exists to solve the "I just generated forty garbage images and now my output folder is a crime scene" problem, plus it embeds your prompt and generation params into the file as metadata so the workflow survives after you close the tab.

How it works

It's a file saver with opinions. The image comes from either the image input or, if that's unconnected, pipe.images - which is why you can drop this at the end of a SAX pipe with no image wire at all. The filename is built from a template with variables like {date}, {datetime}, {seed}, {model}, {steps}, {cfg}, each supporting strftime or Python format syntax ({seed:08d} zero-pads). A running index (filename_index) gets appended as prefix or suffix with zero-padding via index_digits, and if a file already exists the node appends _0001, _0002, … instead of overwriting.

Metadata is the part people sleep on. It pulls seed, steps, CFG, sampler, scheduler, and model name straight out of the pipe, and if you wire prompt_text (the docs recommend connecting SAX Prompt's POPULATED_TEXT) it embeds the actual expanded prompt too. Formats are png and webp; webp gets quality and lossless controls. Default output is ComfyUI/output/<date>/001_<datetime>.webp.

The inputs that matter

  • save - boolean, default true. Flip it false while experimenting; nothing is written.
  • output_dir - default {date:%Y-%m-%d}. Relative paths resolve under output/; absolute paths work too. Empty means plain output/.
  • filename_template - default {datetime:%Y%m%d_%H%M%S}.
  • filename_index / index_digits / index_position - the counter that keeps filenames unique.
  • format, webp_quality, webp_lossless - output codec.
  • pipe / image / prompt_text (all optional) - the wiring trio.

The IMAGE output just passes the image through, so you can chain the save node in the middle of something without losing the data.

Installing it

It's part of the SAX_Bridge pack - install once, use all of it. ComfyUI Manager → "Install via Git URL" → https://github.com/so16tm/SAX_Bridge, or:

cd ComfyUI/custom_nodes
git clone https://github.com/so16tm/SAX_Bridge

Restart, and it appears under SAX/Bridge/Output. No model downloads, no required extra dependencies.

Gotchas

Two things bite. First, filename_index does not persist its increments across sessions - the tooltip says it outright: "update manually at the next session." It increments on each save and then you're expected to bump it yourself when you restart. Second, if neither image nor pipe.images is connected, the node raises a clean error telling you to connect one. And the one design constraint to respect: image adjustments like sharpening and grayscale belong upstream in SAX Finisher, not here - this node saves, it doesn't polish.

CategorySAX/Bridge/Output

Inputs (12)

NameTypeDefaultDescription
saveBOOLEANtrueTrue to save. False for preview only.
output_dirSTRING{date:%Y-%m-%d}Output directory. Template variables supported. Leave empty for ComfyUI/output/. Relative paths are based on output/. Absolute paths also accepted.
filename_templateSTRING{datetime:%Y%m%d_%H%M%S}Filename template. Use {var} or {var:format} syntax. Available: {date} {time} {datetime} {seed} {model} {steps} {cfg}.
filename_indexINT10–999999Starting index value. Increments with each save. Update manually at the next session.
index_digitsINT31–6Zero-padding digit count for the index. 3 = 001, 4 = 0001.
index_positionCOMBOAttach the index to the beginning (prefix) or end (suffix) of the filename.
formatCOMBO2 options: webp, png
webp_qualityINT901–100WebP quality (1–100). Ignored when lossless=True.
webp_losslessBOOLEANfalse
pipeoptPIPE_LINEImage source and metadata supplier (seed, steps, CFG, model name, etc.) when image is not connected.
imageoptIMAGETarget image to save. Falls back to pipe.images if not connected.
prompt_textoptSTRINGPrompt text to embed in metadata. Recommended: connect SAX Prompt's POPULATED_TEXT.

Outputs (1)

NameTypeDescription
IMAGEIMAGE