Nodes/comfyui-imgmake/SaveImage_lp
ComfyUI Node

SaveImage_lp

A save node with real format control — and one footgun in the filename

By dafeng012·Created 2 years ago·Updated 2 years ago· 17
SaveImage_lp
  • images
    output_dir
    filenameComfyUI
    file_type

    SaveImage_lp is the pack's answer to "I want my images written to a specific folder, in a specific format, without playing hide-and-seek in ComfyUI's output directory." Core's Save Image writes to its managed output dir and gives you PNG or lossless-webp-ish choices at best. This one writes anywhere you point it and lets you pick PNG, JPEG, or WEBP (lossless or lossy). For a keyframe pipeline that already lives on disk outside ComfyUI, that's the difference between exporting to a folder and exporting to the right folder.

    It's an output node - no output sockets, it just does the writing. In the EBSynth workflow you'd normally use it to save your painted keyframes back to disk, or to export a batch of frames from some other graph into a folder you can feed the pipeline.

    The inputs

    • output_dir - where to write, as an absolute path. The node creates it if missing.
    • images - the IMAGE batch to save; each image in the batch becomes its own file.
    • filename - here's the footgun, see below.
    • file_type - PNG, JPEG, WEBP (lossless), or WEBP (lossy).

    The footgun: filename must be a number

    The node takes your filename and does int(filename) on it, then zero-pads to five digits: 1 becomes 00001.png, 42 becomes 00042.png. That's great for frame sequences - but the default value is the string "ComfyUI", and int("ComfyUI") throws a ValueError. Yes, the node crashes with its own default. Put a number in there (any integer, 1 is fine) and it works. If you want names that aren't numbers, this node isn't the one - it's built for numbered sequences and doesn't care about your feelings on the matter.

    JPEG and WEBP (lossy) get quality 90, PNG embeds ComfyUI workflow metadata (unless you launched with --disable-metadata), and WEBP (lossless) is, well, lossless. So the practical use is: number-prefixed frame batches to a known folder, in the smallest format you can live with.

    Installing it

    Standard pack install - ComfyUI Manager (search comfyui-imgmake) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dafeng012/comfyui-imgmake
    

    Restart. This node is pure Pillow plus ComfyUI's metadata plumbing - no ffmpeg, no models, no EBSynth. It's one of the few nodes in this pack that installs into a working state with zero fuss.

    Troubleshooting

    • ValueError: invalid literal for int() - the filename default. Change filename to a number and you're done.
    • "No such file or directory" - check output_dir is an absolute path and writable; unlike some savers it won't fall back to a managed dir.
    • Sequence numbers restart every run - it always starts at your filename value, so running twice overwrites or appends predictably. If you want no-clobber runs, change filename per run or point at a fresh folder.

    Honest verdict: for numbered batches to a custom folder it's exactly what you want. For everything else it's the node with the one weird default that crashes - which, if you got here from a broken workflow, is probably why. Set filename to 1 and move on.

    CategoryIMAGEmake

    Inputs (4)

    NameTypeDefaultDescription
    output_dirSTRING
    imagesIMAGE
    filenameSTRINGComfyUI
    file_typeCOMBO4 options: PNG, JPEG, WEBP (lossless), WEBP (lossy)

    Outputs (0)

    No outputs