Nodes/ComfyUI-QING/保存图像丨命名
ComfyUI Node

保存图像丨命名

Save an image under a name you control, to a folder you choose

By sheengoa·Created about a year ago·Updated 20 days ago· 16
保存图像丨命名
  • image
  • image
  • saved_path
new_name
extensionpng
custom_save_path

ComfyUI's built-in save node names your images ComfyUI_00001_, ComfyUI_00002_, and loses them in a flat folder. QING_SaveImage is the QING pack's replacement: you pick the name, the extension, and the folder, and it writes exactly where you want. It's the "this batch goes in /output/2026-08-26/final, each file called portrait_001.png" node that makes a batch actually deliverable.

What it does

Inputs: image, new_name (a string; leave it empty and the node falls back to the upstream image's original filename, traced through the graph the same way QING_GetImageName does), extension (png / jpg / jpeg / webp, default png), and custom_save_path - absolute path if you want to leave the output folder, or a relative path that resolves inside ComfyUI's output directory.

Outputs: image (a passthrough, so the node doesn't break your chain) and saved_path (the full path(s), newline-joined for batches).

Mechanically it converts the tensor to a PIL image and saves: PNG optimized, JPEG at quality 95, WebP at quality 95 with method=6 (the slow, high-quality WebP mode). Batches get a numeric suffix - name_001.png, name_002.png - so a batch of 20 becomes one clean set of files. Names are sanitized (slashes become underscores) so you can't accidentally create paths with your filename.

Where you'd reach for it

Organized batch output, full stop. Combine it with a QING_PromptRandomizer roll or a per-item index and you can name each file meaningfully - scene_12_cold_light.png instead of ComfyUI_00437.png. Pair with QING_GetImageName and QING_MetadataWriter and you get a complete save story: original name preserved, custom folder, provenance record attached. It's an output node, so it always executes - a good place for a batch to land.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/GAO-SHIQING/ComfyUI-QING
cd ComfyUI-QING
python install_dependencies.py

Restart ComfyUI after. Uses Pillow for encoding - in the pack's requirements already. Manager: search "ComfyUI-QING." (README's GAOSHI-QING clone-URL typo aside, the repo is GAO-SHIQING/ComfyUI-QING.)

Things to know

The format tradeoff is worth being deliberate about. JPEG and WebP don't carry ComfyUI's embedded workflow the way PNG does - the KB's image-io doc is blunt that re-encoding deletes the source code of your image. If you want the workflow-in-the-file, save PNG and convert later; if you're saving JPG for delivery, pair this with QING_MetadataWriter so the provenance survives as text. Also: with custom_save_path empty and new_name empty, it uses the traced upstream name - which for a generated image falls back to image.png, same as GetImageName. Give generated output a real new_name unless you like a folder of image.png files.

CategoryQING/图像处理

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
new_nameSTRING
extensionCOMBOpng4 options: png, jpg, jpeg, webp
custom_save_pathSTRING

Outputs (2)

NameTypeDescription
imageIMAGE
saved_pathSTRING