ZML_保存图像_V2
JPEG, WebP, quality control — no text block
- 图像
- 图像
- Help
If ZML_SaveImage is the pack's flagship - the one that bakes your prompt into the PNG as a "text block" - then V2 is the one that trades that feature for formats. Same save-node skeleton, but where the original is PNG-only and prompt-centric, V2 adds a format dropdown and a quality slider, and quietly drops the text-block and sidecar-txt features entirely. The class docstring says it straight: "supports multiple formats and quality control, removed text block and TXT saving."
That's a deliberate split, not a downgrade. You reach for V2 when you need a JPEG or WebP out of ComfyUI - a gallery, an upload to a site that recompresses anyway, a quick preview you don't want at 15MB PNG size. You reach for V1 when the image is your archive and the prompt needs to survive inside it.
The inputs that matter
- 存储格式 -
png,jpg,jpeg,webp,bmp,tiff. The author's own tooltip is the important note here: only png stores metadata. JPEG and WebP re-encode and drop PNG text chunks, so a JPG from this node will never carry a ComfyUI workflow or a ZML text block - same rule as the wider ecosystem (see our image-io-metadata notes: PNG is the only round-trippable master). - 图像质量 - 1–100, default 80. Only meaningful for lossy formats (jpg/jpeg/webp); PNG and BMP ignore it. 80 is a sensible place to leave it.
- 操作模式 - 保存图像 or 仅预览图像. Preview mode writes to ComfyUI's temp folder instead of your output folder, so you can iterate without filing away a dozen JPEGs.
- 保存路径 - defaults to
output/ZML_v2/%Y-%m-%d, strftime-aware like the V1 node, so subfolders by date happen automatically. - 文件名前缀 / 使用时间戳 / 使用计数器 - same naming machinery as V1. 使用计数器 gives you the zero-padded
#-#00001style sequence, and note it shares the same counter files with V1, so the two nodes don't double-count against each other.
It also keeps 生成预览, 限制图像大小 + 最大分辨率 (downscale the long edge and round to multiples of 8), and 清除元数据. Same pass-through 图像 output and the Help string with your lifetime save count.
The one trade-off to remember
The tooltip's "only png stores metadata" is the whole story in miniature. If you save a WebP thinking you'll later load it back and recover the prompt, you won't - the graph and any text block die in the re-encode. This matches the general rule in the ecosystem: treat PNG as the master, and treat V2's non-PNG formats as derivatives. My honest use: keep V1 in the workflow for the keepers, put V2 at the end of a preview branch for the discard pile.
Install
Same pack as everything else: ComfyUI Manager → search "ComfyUI-ZML-Image", or cd ComfyUI/custom_nodes && git clone https://github.com/zml-w/ComfyUI-ZML-Image, restart, done. No extra models to download for this node; the pack's heavy requirements (ultralytics, opencv) exist for its other, image-processing nodes. And since the pack's UI is Chinese by default, grab the English patch on first install.
One small gotcha: because V1 and V2 share counter files, enabling 使用计数器 in two nodes at once means both increment the same counter - fine if that's the intent, mildly confusing if you expected independent sequences.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| 操作模式 | COMBO | 保存图像 | 2 options: 保存图像, 仅预览图像 |
| 存储格式 | COMBO | png | 仅有png格式会存储元数据 |
| 图像质量 | INT | 801–100 | 仅对jpg/webp等有损格式有效 |
| 保存路径 | STRING | output/ZML_v2/%Y-%m-%d | — |
| 文件名前缀 | STRING | — | |
| 文件名后缀 | STRING | — | |
| 使用时间戳 | BOOLEAN | true | — |
| 使用计数器 | BOOLEAN | false | — |
| 生成预览 | COMBO | 启用 | 2 options: 启用, 禁用 |
| 限制图像大小 | COMBO | 禁用 | 2 options: 禁用, 启用 |
| 最大分辨率 | INT | 10248–8888 | — |
| 清除元数据 | COMBO | 禁用 | 仅有png格式会存储元数据 |
| 图像opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |
| Help | STRING | — |