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

Input Image Bucket

Input Image Bucket

By littleowl·Created 3 months ago·Updated 3 months ago· 2
Input Image Bucket
    • image
    • mask
    • manifest
    key

    Here's the pitch in one line: this is LoadImage whose source is an S3-compatible bucket instead of your input/ folder. You type (or wire in) a key - something like <subfolder>/<uuid> - and the node fetches the image, decodes it exactly the way the native node would, and hands you IMAGE, MASK, and a BUCKET_MANIFEST.

    Why would you care? Because if you're driving ComfyUI programmatically - as an API, from a queue, or across a couple of machines - shuttling image bytes into every request is clumsy and doesn't scale. A short key does. Same asset, reachable from any machine that can see the bucket: your laptop, a Tailscale-linked box, a cloud GPU. The people solving the "get my images to/from S3" problem keep inventing save/load extensions for it, and this pack is the version that makes the bucket the source of truth rather than an afterthought.

    How it works

    The key resolves to every object stored under it. A single image is stored as <key>.png; a batch becomes <key>_0.png, <key>_1.png, and so on - so one key returns the whole batch as a single image tensor. Decoding mirrors stock LoadImage: EXIF transpose, RGB conversion, and the alpha channel turned into the MASK output (inverted, same convention as the native node). If the source has no alpha, you get the usual placeholder mask.

    The third output, manifest, is the metadata sidecar (<key>.json). If none is stored, it's derived on the fly from the objects and the decoded pixels - the derived flag on the manifest tells you which case you're in.

    Two things you don't have to run the workflow to enjoy: type or paste a key and the image previews immediately, and every input node has a "choose file to upload" button that PUTs a local file straight into the bucket and sets the key for you.

    The inputs that matter

    Just one: key (STRING). Paste or wire in <subfolder>/<uuid>. That's the whole interface - the design bet is that keys, not dropdowns, are what an API workflow passes around. If you'd rather pick from a list, use Load Image From Bucket instead; it's the same loader with a dropdown.

    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, and it's under buckets/image. Deps are just boto3 and python-dotenv. The .env at the pack root holds your endpoint, keys, and bucket names (S3_IMAGE_BUCKET, default image); buckets are created automatically on first use.

    Where people get burned

    The classic failure is "no image objects found for key" or a generic S3 error - that's S3Unavailable, and the node surfaces it rather than pretending nothing's wrong. Check three things in order: is the endpoint right (S3_ENDPOINT_URL, blank means real AWS), are credentials set (or is an IAM role assumed), and does the key actually exist in the bucket you configured? RustFS/MinIO setups usually want S3_ADDRESSING_STYLE=path; AWS is fine with auto. Once those are right, keys just work.

    Categorybuckets/image

    Inputs (1)

    NameTypeDefaultDescription
    keySTRINGThe key representing the image asset, e.g. '<subfolder>/<uuid>'. Resolves to every frame stored under that key.

    Outputs (3)

    NameTypeDescription
    imageIMAGEImage(s) loaded from the asset bucket. Multiple objects under the key are returned as a batch.
    maskMASKAlpha mask(s) for the loaded image(s).
    manifestBUCKET_MANIFESTAsset metadata. Derived from the image(s) if no manifest is stored.