Image Batch Loader
Your training folder, dumped into a graph
- IMAGE
- IMAGE_PATH
If you're training a character LoRA, the boring part isn't the training - it's getting a folder of reference images into the graph without hand-wiring thirty Load Image nodes. CCC_ImageBatchLoader is Mickmumpitz's answer: point it at a folder, it hands you every image as a list, plus each one's file path. It's part of the Consistent Character Creator (CCC) group in this pack, which exists to build LoRA training datasets in the graph instead of on disk.
The name is from Mickmumpitz's own character-sheet workflow - he's a YouTuber whose consistent-character setups are popular and, in the community's words, "definitely a pain" to set up. This loader is one of the easier pieces.
How it works
The key detail most people miss: both outputs are lists, not a single batched tensor. Each image comes through as its own [1, H, W, C] tensor inside a Python list, so downstream nodes that iterate per-image (like the captioning Prompt Studio or a captioner that runs on one image at a time) behave the way you expect. The IMAGE_PATH output carries the matching absolute file path for every image, which is how you can later wire captions back to files for AI Toolkit or your trainer.
Under the hood it lists the folder, filters to png/jpg/jpeg/webp/bmp, sorts by filename, and feeds everything through EXIF transpose so phone photos stop coming in sideways. Only two inputs actually matter:
image_dir- the folder. Note the default is a Windows-styleC:\path\to\your\images; on Linux or macOS use your real path.mode-sequentialloads a range of files;single_image_incrementreturns exactly one image, which is handy for stepping through a set one render at a time.batch_size-0(default) means "everything fromstart_fromonward". Set a positive number to take a slice.start_from- 1-based index into the sorted list where loading begins. Insingle_image_incrementit wraps around the folder, so you can step forever.
Where it fits
Wire the IMAGE list into your captioning stack, keep IMAGE_PATH as a side-channel for matching, then feed the pair into CCC_TextBatchLoader-style captions for the Dataset Reviewer or Show Image + Text Pairs. That's the whole dataset-assembly loop this pack is built around: load images, caption them, review them, train.
Installing it
This node ships in the Mickmumpitz-Nodes pack, not standalone:
- ComfyUI Manager - search "Mickmumpitz", install, restart.
- Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git
Then restart ComfyUI. Dependencies are light - numpy, Pillow, opencv-python - and there's nothing to download for this node. The optional ultralytics dependency only matters for the face-area splitter nodes, not here.
Troubleshooting
- "Directory '...' does not exist." - the node raises a clear error, so check the path you typed. It does not validate on the widget; the error comes at queue time.
- "No valid image files found." - the folder exists but nothing it likes is in it. The extensions are hard-coded; TIFFs and AVIFs won't load.
- Ordering surprises - files are sorted by name, so
img10.pngsorts beforeimg2.png. If you need strict numeric order, name your filesimg01,img02, … start_fromis 1-based - a common off-by-one.start_from=1is the first file, not the second.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image_dir | STRING | C:\path\to\your\images | — |
| batch_size | INT | 00–1000 | — |
| start_from | INT | 1 | — |
| mode | COMBO | 2 options: sequential, single_image_increment |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| IMAGE_PATH | STRING | — |