Nodes/comfyui-timesaver/TS Batch Load Image
ComfyUI Node

TS Batch Load Image

The name lies — it loads one image, and that's the point

By AlexYez·Created 2 years ago·Updated about 16 hours ago· 11
TS Batch Load Image
    • image
    • mask
    • name
    path

    The name is a lie, and it's the best thing about this node. TS Batch Load Image does not load a batch of anything. It reads exactly one image from a file path. The batching happens upstream - and that one-trick design is exactly what lets you walk a folder of a hundred 4K photos without ComfyUI choking on them.

    Why it exists

    ComfyUI's output cache holds whatever a wire carries until the branch is done with it. If you handed a hundred full-res frames down a single IMAGE wire, every one of them sits in memory before the first caption is written - the pack's README puts that number at roughly 10 GB. So its sibling node, TS Batch Source, deliberately hands out paths, not pictures. This node is the other half of that deal: it reads each path one at a time, keeping peak memory at a single frame. A folder of a thousand images becomes a folder of one image, a thousand times.

    The one input that matters

    The whole input surface is a single path field, and the tooltip says it plainly: "Full path to an image file. Usually the 'item' output of TS Batch Source." That's it. Wire the item output of TS Batch Source in here and the branch below runs once per picture.

    Under the hood it's Pillow, with two touches that tell you someone actually runs this stuff. It cleans the path first - stripping the quotes Explorer's "Copy as path" adds - and it applies EXIF orientation before converting pixels, because a phone photo is stored sideways and a caption written from the sideways version describes the wrong thing. It also fingerprints the file by modification time and size, so if the picture changes on disk the node re-reads it instead of serving you the cached version.

    The outputs

    • image - the loaded picture as [1, H, W, C]. This is what you feed your captioning or generation model.
    • mask - the alpha channel as a mask, or a fully opaque mask when the file has none. If you loaded a cut-out PNG with transparency, this is where it shows up.
    • name - the file name without its extension. This is the quiet star. Wire it into TS Batch Write's name input and your caption lands on disk as photo.jpgphoto.txt, sitting right beside its picture. That's the dataset layout LoRA training actually wants.

    Getting it installed

    The node ships in comfyui-timesaver by AlexYez, a large (76-node) utility pack. Through ComfyUI Manager: search for Timesaver → install → restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AlexYez/comfyui-timesaver
    cd comfyui-timesaver
    python -m pip install -r requirements.txt
    

    Then restart ComfyUI fully - not just refresh the browser tab. On the Windows portable build, run pip from python_embeded\python.exe or the deps land in the wrong interpreter. No model downloads and no heavy dependencies for this node: it's pure plumbing, so it just works.

    When NOT to use it

    The README is honest about this: for a single ad-hoc file, the standard Load Image is simpler. This node's only superpower is being path-driven - so reach for it inside a batch chain, not for one-off work.

    Troubleshooting

    • "Not a file: …" - the path didn't resolve. Give an absolute path, or one relative to where ComfyUI actually runs.
    • "No path given." - the path input is empty; that's the one real failure mode, and it's the node's way of telling you it can't guess.

    The typical chain that makes all of this click: TS Batch Source → TS Batch Load Image → your model → TS Batch Write. Three nodes from one pack, and a folder full of captions comes out the other end.

    CategoryTS/Image/Batch

    Inputs (1)

    NameTypeDefaultDescription
    pathSTRINGFull path to an image file. Usually the 'item' output of TS Batch Source.

    Outputs (3)

    NameTypeDescription
    imageIMAGEThe loaded image [1,H,W,C].
    maskMASKAlpha channel as a mask, or a fully opaque mask when the file has none.
    nameSTRINGFile name without its extension — handy for naming the result after the source.