Nodes/ComfyUI_Burve_Tools/Burve Save Generated Image
ComfyUI Node

Burve Save Generated Image

Save a Gemini image the way Google actually sent it — bytes and all

By Burve·Created 9 months ago·Updated 5 days ago· 5
Burve Save Generated Image
  • image
  • generated_image_pipe
  • saved_files
filename_prefixBurve

A normal Save Image node re-encodes whatever you hand it. That's usually fine. But when the image came from Google, "re-encode" quietly means throwing away exactly what the API sent you - HEIF bytes become a PNG, WebP gets converted, and every pass through a JPEG costs quality. Burve Save Generated Image exists to not do that: when you connect the generated_image_pipe from a Burve Gemini node, it writes the raw response bytes exactly as Google returned them, original encoding preserved.

That's the headline, and it's worth it on its own if you care about output fidelity - HEIC/HEIF support is literally why the pack ships pillow-heif as a dependency. But the node is more than a byte-copier. It's the pack's official save step for the Gemini generation nodes, and it handles the messy edges of that job.

What it does

Inputs are image (the standard IMAGE output from either Gemini node, used as the fallback/batch), filename_prefix (default Burve), and the optional generated_image_pipe. With a pipe connected, this happens:

  • Supported MIME types - PNG, JPEG, WebP, HEIC, HEIF - are written to disk exactly as returned, no decode/re-encode round-trip.
  • Final artifacts are preferred over "thought" artifacts. If no final image exists, it can still save the available thought images instead of dropping them.
  • Mixed-size or non-batched results are saved individually rather than being lost from the legacy IMAGE batch - which matters because the batched image output only carries frames whose dimensions match the first result.
  • If raw bytes or a supported MIME type aren't available, it falls back to saving the matching frame as PNG with normal ComfyUI prompt metadata, so you never silently lose a result.

The single saved_files output is a text listing of everything written, including format fallbacks, skipped artifacts, and pipe notes - handy when a save "didn't work" and you need to see why.

Install

Pack-wide: ComfyUI Manager → search ComfyUI_Burve_Tools → install → restart, or

cd ComfyUI/custom_nodes
git clone https://github.com/Burve/ComfyUI_Burve_Tools.git
cd ComfyUI_Burve_Tools
pip install -r requirements.txt

Dependencies are google-genai (≥2.13, <3), pillow, and pillow-heif (≥0.18). No model downloads. The node itself doesn't need the Gemini key - that's on the generation side - but you need ComfyUI 0.4.0+.

Gotchas

  • Raw-byte saving requires the pipe. Without generated_image_pipe connected, this behaves like a competent PNG save with prompt metadata. Connect the pipe to get original-format preservation.
  • It's a v1/v2 pipe consumer. The pack's save node accepts both generations of GENERATED_IMAGE_PIPE (version 2 preserves full original bytes), so older saved workflows still load.
  • HEIC/HEIF files open poorly in some viewers. The bytes are faithful; if your image viewer can't read them, that's a viewer problem, not a save problem.
  • Your images already left the machine by the time you're here - the save step is local, but the generation wasn't. Keep that in mind before you generate anything sensitive.

It's a save node, so the whole job is "don't lose quality and don't lose files," and it does both better than the default. If you're building a Gemini-image workflow in this pack, this is the node to end it with.

CategoryBurveTools

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
filename_prefixSTRINGBurve
generated_image_pipeoptGENERATED_IMAGE_PIPE

Outputs (1)

NameTypeDescription
saved_filesSTRING