Nodes/Comfy-Pack/Zip Output(img + txt file)
ComfyUI Node

Zip Output(img + txt file)

One download with the images and their text sidecars

By bentoml·Created 2 years ago·Updated 10 months ago· 217
Zip Output(img + txt file)
  • images
    filename_prefixcpack_output_
    text

    Zip Output is the Comfy-Pack node that bundles your generated images and their text into one archive - which makes it the pack's answer to the question "what if the API caller wants everything in a single download?" It's the output node you reach for when images alone aren't the deliverable, and the name in the node browser says it all: Zip Output(img + txt file).

    Comfy-Pack, if you're new here, is BentoML's toolkit for packaging ComfyUI workflows as reproducible .cpack.zip artifacts and serving them as REST APIs. Its output nodes define what the served POST /generate endpoint returns. Image Output returns PNGs; Zip Output returns a single archive containing PNGs and matching text files - the pairing that matters for captioning pipelines, dataset building, and anyone shipping a batch of generations with metadata attached.

    How it works

    It takes your IMAGE tensor and a text string, then does something ComfyUI's built-in saves can't: it writes the whole batch into a .zip in your output directory. Each image becomes image_00000.png inside the archive, and each image gets a matching text_00000.txt beside it carrying your text. Every PNG inside still carries the workflow prompt in its metadata - so you get the "drag it back into ComfyUI" sharing trick and a machine-readable sidecar. Files are numbered off a base counter so repeated runs produce fresh archives rather than overwriting, and the whole zip is assembled in memory before hitting disk, so it plays fine with the serve flow.

    The inputs that matter

    • images - the IMAGE tensor to package. The pack's tooltip: "The images to save." Wire from your VAE decode.
    • text - a string, default empty. This gets written as a .txt file next to every image in the archive. Feed it a prompt, a caption, or JSON.
    • filename_prefix - default cpack_output_. The zip lands in your output folder as <prefix>_batch_NNNNN.zip.

    No outputs - terminal node.

    Install

    Standard pack install:

    • ComfyUI Manager: search comfy-pack, Install, restart, refresh.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/bentoml/comfy-pack, restart.

    The pack drags in BentoML and comfy-cli, so the first install is heavier than most nodes - budget a minute.

    Gotchas

    Two things. First, the same text is written for every image in the batch - there's no per-image text input exposed, so if you need different captions per frame, this isn't the node. Second, don't confuse this with the Enable Zip Output switch node, which has no inputs, no outputs, and does nothing at runtime; it's a marker, while this node is the thing that actually writes the archive. If a workflow came from the pack's ecosystem and something "zip" is misbehaving, check which node you actually have on the canvas.

    CategoryComfyPack/output

    Inputs (3)

    NameTypeDefaultDescription
    imagesIMAGEThe images to save.
    filename_prefixSTRINGcpack_output_
    textSTRING

    Outputs (0)

    No outputs