Pillow Image JPEG Save
The JPEG-only Pillow Image JPEG Save node
- images
You already have ComfyUI's built-in Save Image node, and it's fine. So why would you reach for a node that can only write JPEGs, gives you no preview, and won't even pass your image through? Because when you're running 500 generations in a night - checkpoint inventory, LoRA hunting, a big batch of prompt tests - you don't want 500 PNG masters clogging your output/ folder. You want small, named, sensibly-filed JPEGs that are easy to skim. That's exactly what Pillow Image JPEG Save does, and it refuses to do anything else.
It comes from ComfyUI-PillowImageSaver, the Pillow-based sibling of the same author's GMImageSaver. Same user-facing design, but it replaces the external GraphicsMagick command with a pure-Python Pillow save. So no extra binary to install, no subprocess calls, no odd "did the shell command actually run?" failure modes. It's a deliberately narrow tool from a small family of nodes - and its natural partner is the author's CheckpointHandpickerSuite, where ckpt_name_safe → label gives you checkpoint-aware filenames for free.
How it works
Under the hood it's about as simple as a save node gets. The images input is a ComfyUI IMAGE tensor; the node converts each one from the usual 0–1 float HWC form to a uint8 RGB array, hands it to Pillow, and writes a JPEG. One file per image in the batch, with a four-digit counter that's a minimum width - when you hit image_10000.jpg it just keeps counting rather than colliding. Files are created exclusively (open(..., "xb")), so it won't clobber something you dropped in the folder by hand, and the progress bar ticks once per saved image. Alpha channel? JPEG has no alpha, so RGBA inputs get their first three channels - transparency is silently dropped, exactly as with any other JPEG write.
One thing worth knowing before you swap it in: these JPEGs carry no embedded workflow metadata. ComfyUI's default Save Image bakes the prompt and graph into a PNG; this node doesn't. If round-trippable masters matter to you, keep the built-in Save Image in the workflow for the keepers and use this node for the throwaway volume.
The inputs that matter
There are seven required widgets plus three optional pins. The two you'll actually touch:
- quality - JPEG quality, 1–100, default 80. The defaults are deliberately moderate: 80 with subsampling
4:2:2keeps inventory output light. When you've picked favorites and want final output, bump to 95 /4:4:4. - directory_pattern - 14 layouts for how files land under your output folder, from flat
nonetoprefix/date(the default) toprefix/date/label. If a pattern includeslabel, you must connect the label input or the node errors out.
Then the optional pins: output_dir (a string node; absolute paths used as-is, relative resolved under ComfyUI's output folder), label (any string - ckpt_name_safe from HandpickerSuite is the intended source), and comment (writes a JPEG comment, capped at 65 KB). Note that filename_prefix is sanitized literally - it's not Save Image's %date% template language. Date goes in the filename via the separate filename_date_format widget instead.
Installing it
Through ComfyUI Manager, search for ComfyUI-PillowImageSaver and hit install. Or from a terminal:
cd ComfyUI/custom_nodes
git clone https://github.com/ruminar/ComfyUI-PillowImageSaver
Then restart ComfyUI. The only dependency is Pillow>=10.0.0, which your ComfyUI environment almost certainly already has - that's the whole selling point over the GraphicsMagick version.
The honest catches
- No preview. The node intentionally returns nothing. If you want to see what you're saving, branch the
IMAGEbefore this node into a Preview Image node. - No PNG, no metadata. See above. JPEG is a delivery format, not an archive format.
- Absolute vs. relative
output_dir: drive-relative paths likeC:fooare rejected - useC:\foo.
For what it's designed for - high-volume batch saves with organized folders and checkpoint-aware names - it's the right tool, and it doesn't try to be anything else.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | image | — |
| directory_pattern | COMBO | prefix/date | 14 options: none, date, prefix, prefix_date, prefix/date, label, +8 |
| filename_date_format | COMBO | none | 3 options: none, yyyyMMdd, yyyyMMdd_HHmm |
| quality | INT | 801–100 | — |
| subsampling | COMBO | 4:2:2 | 3 options: 4:4:4, 4:2:2, 4:2:0 |
| progressive | BOOLEAN | false | — |
| output_diropt | STRING | — | |
| labelopt | STRING | — | |
| commentopt | STRING | — |
Outputs (0)
No outputs