- image
- mask
- filename
- count
If you've ever wanted to img2img-restyle a folder of photos in one go, you've hit the wall this node exists to break: ComfyUI's built-in LoadImage takes exactly one image, and batch workflows mean wiring up the community's "Load Image Batch" workarounds or fiddling with zip loading. DeepSoch's Load Images uploads one or many images at once and emits them as a list, and the downstream chain auto-runs once per image. Upload twenty portraits, hit queue, get twenty restyled versions.
The mechanism is a two-part act. The frontend (web/load_images.js) gives you a "Upload Images" button that pushes each file to ComfyUI's standard /upload/image endpoint - so your files land in the normal input folder and survive restarts - and stashes the filenames as a JSON array in a hidden widget called files. At execution, the Python side reloads each file, applies EXIF transpose, and converts it to ComfyUI's (1, H, W, 3) IMAGE tensor plus a (1, H, W) MASK tensor. The mask is derived from the alpha channel if the image has one (inverted, so transparent areas read as mask=1) and is all zeros otherwise - handy if you're feeding an inpainting or control path that wants a mask for every image.
The preview is the part you'll actually notice: native-style multi-image preview with a grid view, click-to-fullscreen, and a counter button that cycles through the uploads. It deliberately mirrors ComfyUI's own SaveImage/PreviewImage widget, so it doesn't feel like a bolted-on third-party widget.
The inputs are minimal to the point of being invisible - there's exactly one, files, a STRING that's a JSON array you should never type by hand; the UI manages it. What matters is the output side:
image(IMAGE list) - each loaded image as a tensormask(MASK list) - alpha-derived mask per imagefilename(STRING list) - the original filenames, so you can keep track of which output came from which inputcount(INT) - how many images, for plumbing batch logic
Because image, mask and filename are declared as lists, ComfyUI runs everything downstream once per uploaded image automatically. That's the whole point: no manual batching nodes.
Install is the shared DeepSoch Toolkit story - ComfyUI Manager, search "DeepSoch Toolkit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/deepsoch/ComfyUI-deepsoch-toolkit
then restart. No third-party Python dependencies; the node just needs torch, numpy and PIL, which ComfyUI already has.
Two failure modes worth knowing. Queue with no uploads and it raises "No images uploaded" - a hard error instead of silently generating nonsense, which is the good kind of behavior. And if you delete a file out of the input folder after uploading, you get a FileNotFoundError on that name. Neither is a bug; both are the node refusing to guess. For a batch-restyle workflow, pair it with a Prompt Preset node and you've got the full "N images × M styles in one queue" setup in about four nodes.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| files | STRING | [] | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| filename | STRING | — |
| count | INT | — |