Nodes/ComfyUI In-N-Out Bucket/Output Image Bucket
ComfyUI Node

Output Image Bucket

Output Image Bucket

By littleowl·Created 3 months ago·Updated 3 months ago· 2
Output Image Bucket
  • images
  • image
  • key
  • manifest
image_formatpng
subfolder

This is the node that makes the whole "bucket" idea click. Output Image Bucket is SaveImage whose destination is your S3-compatible bucket instead of output/ - and instead of a filename_prefix that needs counters to avoid collisions, it invents a clean UUID key for you. Feed it images, and you get back the key the images were stored under, ready to pass to any input/load bucket node on any machine.

Outputs: image (the input, passed through so you can chain), key (STRING - the <subfolder>/<uuid> that now identifies the asset), and manifest (BUCKET_MANIFEST, the sidecar metadata written next to the objects).

How it works

A few details worth knowing because they bite if you assume this is a dumb save node:

  • Batch handling. A single image is stored as <key>.png; a batch becomes <key>_0.png, <key>_1.png, ... - one key maps to the whole batch, and loading that key later returns all frames as one tensor. No filename counters, no collisions, content-stable.
  • Format choices. image_format is a COMBO: png (default), jpeg, or webp. PNG keeps alpha and embeds the workflow/prompt metadata just like the native SaveImage (unless you run with --disable-metadata); JPEG drops alpha and re-encodes at quality 95; WebP at 90. PNG is your master copy, as always - JPEG/WebP are the compact derivatives.
  • Subfolders. The optional subfolder input prefixes the key, e.g. projects/foo, producing projects/foo/<uuid>. Handy for organizing by job or client.
  • Manifest. A <key>.json sidecar is written alongside describing format, dimensions, batch size, and creation time - the metadata record the pack uses so your storage stays self-describing.

Why you'd reach for it

The killer move is the round trip: an output key feeds straight into an Input/Load node with zero copying between output/ and input/ folders. In an API or multi-machine setup, your caller just stores the key string - a few dozen bytes - instead of hauling the PNG around. The pass-through image output means you can also drop this node mid-pipeline without breaking the graph, which makes it easy to adopt gradually.

Install

ComfyUI Manager (search In-N-Out Bucket) or:

cd ComfyUI/custom_nodes
git clone https://github.com/littleowl/ComfyUI_In-N-Out_Bucket.git
pip install -r ComfyUI_In-N-Out_Bucket/requirements.txt
cp ComfyUI_In-N-Out_Bucket/.env.example ComfyUI_In-N-Out_Bucket/.env

Restart, find it under buckets/image. Deps are boto3 + python-dotenv only; no model downloads, nothing heavy.

Where people get burned

Writes failing usually trace back to the bucket, not this node: wrong endpoint, missing credentials, or S3_ADDRESSING_STYLE set to auto when your RustFS/MinIO host wants path. The buckets named in .env are auto-created on first use, so "bucket doesn't exist" is rarely the issue. One genuine surprise: if you save to jpeg, the alpha channel is silently gone - transparent PNGs shouldn't be sent through JPEG unless you want a black background baked in. And don't forget the output key is what downstream needs; wire the key output forward rather than reconstructing it by hand.

Categorybuckets/image

Inputs (3)

NameTypeDefaultDescription
imagesIMAGEThe image assets.
image_formatCOMBOpngFile format the images are stored as in the bucket.
subfolderoptSTRINGOptional prefix to organize assets, e.g. 'projects/foo'. The returned key is '<subfolder>/<uuid>'.

Outputs (3)

NameTypeDescription
imageIMAGEThe input images, passed through for chaining.
keySTRINGThe asset key the images were saved under.
manifestBUCKET_MANIFESTMetadata written alongside the images.