Nodes/S3 Connector/S3 Load Image (Full Path)
ComfyUI Node

S3 Load Image (Full Path)

The simplest node in the pack, one string in, image out

By haranesh·Created 7 months ago·Updated 5 months ago· 1
S3 Load Image (Full Path)
    • image
    • mask
    full_path

    S3 Load Image (Full Path) is the leanest node in the S3 Connector pack: one string input, image and mask out. It downloads a file from your S3 bucket using a single complete path like references/portrait.png and hands you an IMAGE tensor ready to feed into a KSampler, a ControlNet apply node, or anything else that eats images. It's the download mirror of the Full Path uploader, and if you're already used to thinking in full keys rather than folder-plus-filename, this is the version that'll feel natural.

    How it works

    Same mechanism as the pack's other loader - boto3.get_object - but with the key built directly from your one string: S3_PREFIX + full_path, with leading and trailing slashes stripped. The object is decoded with Pillow and normalized into a [1, H, W, C] float tensor. One image per call, no batching on load, no caching; every execution re-fetches from the bucket.

    Inputs are just the one:

    • full_path (STRING) - complete S3 path including filename, e.g. jobs/2026-08/out.png. Required; empty input is an immediate error.

    Outputs are the standard pair: image (IMAGE) and mask (MASK). If the downloaded PNG has an alpha channel, the mask is derived as 1 - alpha (ComfyUI's convention for compositing); without alpha you get a zero-filled mask, which downstream nodes interpret as "nothing to mask." Straightforward.

    Installing and configuring

    Identical to every node in this pack. ComfyUI Manager (search "S3 Connector") or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/haranesh/comfyui-s3-connector
    cd comfyui-s3-connector
    pip install -r requirements.txt
    cp .env.example .env
    

    Set the three required variables in .env - S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_BUCKET_NAME. The file lives in custom_nodes/comfyui-s3-connector/.env and is loaded from the node's own directory, so don't put it in your ComfyUI root. S3_REGION defaults to us-east-1; set S3_ENDPOINT_URL only for S3-compatible stores like MinIO, DigitalOcean Spaces, or Cloudflare R2. Restart ComfyUI. Dependencies are just boto3, python-dotenv, and Pillow - no models, no heavy installs.

    Where people get burned

    The error you'll actually hit is NoSuchKey ("Image not found in S3: ..."), which almost always means the key doesn't match what's in the bucket. Double-check your S3_PREFIX: the loader applies it the same way the uploaders do, so a file you pushed as references/portrait.png with prefix comfyui/ is really at comfyui/references/portrait.png, and the load side has to use the same prefix. Also remember the pack's upload side saves everything as RGB PNG and drops alpha - so files you round-trip through this pack will load back with a zero mask, even if the source originally had transparency. If you need the alpha to survive, keep PNGs-with-alpha out of this pipeline.

    CategoryS3 Connector

    Inputs (1)

    NameTypeDefaultDescription
    full_pathSTRING

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK