Nodes/RobeNodes/Save Image (JPEG) 🐀
ComfyUI Node

Save Image (JPEG) 🐀

The small-file output node, and the trade it makes

By RobeSantoroΒ·Created 2 years agoΒ·Updated 3 months agoΒ· 0
Save Image (JPEG) 🐀
  • images
    β—„filename_prefixComfyUIβ–Ί
    β—„quality95β–Ί
    β—„save_metadatatrueβ–Ί

    ComfyUI's default save node writes PNGs, and PNGs of AI images are big. If your output is going to a website, a client, or anywhere file size matters, this node is the swap: same save experience, JPEG on disk, with a quality dial and a metadata option. The trade is real, though, and you should know it before you adopt it - JPEG can't carry the workflow the way PNG does. That's the whole story of this node.

    How it works

    It's a direct SaveImage clone under the hood: takes your images tensor, writes to ComfyUI/output/ with the usual counter-suffixed naming (ComfyUI_00001_.jpg), and supports the same filename_prefix templating - %date:yyyy-MM-dd%, node-value tokens like %Empty Latent Image.width%, and subfolder prefixes all work. The differences are the two things PNG save doesn't give you:

    • quality (INT, 1–100, default 95) - JPEG quality. The node also forces subsampling: 0, meaning 4:4:4 chroma with no chroma downsampling. That's a deliberate, correct choice for AI output: it keeps edges and text sharp where default JPEG compression tends to smear.
    • save_metadata (BOOLEAN, default on) - writes the generation prompt into the JPEG's EXIF UserComment field via piexif. Only the prompt, deliberately: JPEG EXIF is size-limited, so the full workflow JSON is skipped.

    There are no outputs - it's an output node, the terminal point of the graph.

    The trade you're making

    In the ComfyUI ecosystem the image is the project file: a PNG carries the whole node graph embedded as text chunks, and dragging it back onto the canvas rebuilds your workflow. JPEG has no such chunks, so converting to JPEG drops the graph permanently - the drag-back trick is gone, and what survives is at best the flat prompt in EXIF. Keep the PNG as your master and use this node for the small, shareable copies. If your workflow's reproducibility lives in the file itself, don't make this your only save node.

    Installing the pack

    Search "Robe Nodes" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/RobeSantoro/ComfyUI-RobeNodes
    

    Restart ComfyUI. The piexif dependency (for EXIF writing) comes from the pack's requirements.txt; Manager installs it for you.

    Where people get burned

    The common surprise is opening the output expecting a workflow-recoverable file and getting a plain JPEG - that's the design, not a bug. Also worth knowing: quality 95 with 4:4:4 produces files that are much larger than "typical" JPEG but still a fraction of the PNG equivalent; if you're optimizing for bytes, you can drop the quality slider. And since metadata goes to EXIF UserComment, tools that only read PNG text chunks won't see anything - this node's metadata is a record, not a workflow.

    Small node, specific job, done properly. Just don't let it be your only save.

    CategoryRobeNodes

    Inputs (4)

    NameTypeDefaultDescription
    imagesIMAGEThe images to save.
    filename_prefixSTRINGComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.
    qualityINT951–100β€”
    save_metadataBOOLEANtrueStore prompt metadata in JPEG EXIF.

    Outputs (0)

    No outputs