SAX Output
The last node on the graph — SAX Output and the save=False habit
- pipe
- image
- IMAGE
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 underoutput/; absolute paths work too. Empty means plainoutput/.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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| save | BOOLEAN | true | True to save. False for preview only. |
| output_dir | STRING | {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_template | STRING | {datetime:%Y%m%d_%H%M%S} | Filename template. Use {var} or {var:format} syntax. Available: {date} {time} {datetime} {seed} {model} {steps} {cfg}. |
| filename_index | INT | 10–999999 | Starting index value. Increments with each save. Update manually at the next session. |
| index_digits | INT | 31–6 | Zero-padding digit count for the index. 3 = 001, 4 = 0001. |
| index_position | COMBO | Attach the index to the beginning (prefix) or end (suffix) of the filename. | |
| format | COMBO | 2 options: webp, png | |
| webp_quality | INT | 901–100 | WebP quality (1–100). Ignored when lossless=True. |
| webp_lossless | BOOLEAN | false | — |
| pipeopt | PIPE_LINE | Image source and metadata supplier (seed, steps, CFG, model name, etc.) when image is not connected. | |
| imageopt | IMAGE | Target image to save. Falls back to pipe.images if not connected. | |
| prompt_textopt | STRING | Prompt text to embed in metadata. Recommended: connect SAX Prompt's POPULATED_TEXT. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |