π Load Batch Images (BC/NM/POS)
One path in, three map channels out
- bc
- nm
- pos
You've rendered your asset from six angles and the multi-view pass spat out three families of files per angle - base colour, normal, position. They're sitting in a folder with names like MV_head_bc_1.png, MV_head_nm_1.png, MV_head_pos_1.png. Twenty nodes later you need them as three aligned batches.
Most loader nodes would have you add three of them and get the prefixes right by hand. This one takes a single string and returns all three channels.
How it works
The path_mask you type is split into a folder and a prefix. The node then appends the channel tags and globs the folder for each:
bc_β base colour β outputbcnm_β normal β outputnmpos_β position β outputpos
So path_mask = /mnt/l/.../MVs/Head/MV_head_ makes it look for /mnt/l/.../MVs/Head/MV_head_bc_*.png and its siblings. Extensions searched: png, jpg, jpeg, tga, bmp, webp.
Two behaviours worth knowing about, because they're both judgement calls the author made for their own pipeline:
Numbers in filenames sort numerically. If any filename contains digits, the loader sorts by the last number in the name - so ..._bc_2.png correctly precedes ..._bc_10.png. Alphabetical sorting would have given you 1, 10, 2 and silently scrambled your angles. Good decision; not obvious it's happening.
Missing sizes are padded, not resized. The batch is whatever the files are, and any image smaller than the largest gets placed top-left on a black canvas sized to the biggest image in that channel. Missing channels entirely become a 64Γ64 black placeholder so your links stay valid instead of the graph erroring. That's convenient for wiring and dangerous for correctness: a channel that failed to render comes through as a small black batch, and a node downstream that just averages or packs images won't tell you. Watch the console - the node prints a line per channel: [AntonioilevLoader] nm_ β 6 images.
Also note everything is loaded as RGB. Alpha is dropped, full stop. If your base colour pass has transparency you care about, this loader isn't the one.
The single input
path_mask(STRING, default a/mnt/l/Game_2/...path from the author's own drive) - folder + filename prefix, no channel tag, no wildcard, no extension. The trailingMV_head_in the default matters: the underscore is part of the prefix. If your files arehead_bc_01.png, the mask ends athead_; if they'reheadbc01.png, it ends athead.
Outputs: bc, nm, pos - all IMAGE batches in that order. They're three separate batches, so they're index-aligned only if each channel has the same filenames, which is the whole premise of this naming scheme.
It raises a real exception (loud, visible, in the UI) if the folder doesn't exist, and another if it finds nothing at all across the three channels. Good: those are the two failures you'd want to see.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Antonioilev/ComfyUI_Antonioilev_Lightpack.git
python -m pip install pillow
Restart. Pillow is almost certainly already present in any ComfyUI environment; torch and numpy certainly are. ComfyUI Manager can clone the pack (search Antonioilev Light Pack), but note the repo ships no requirements.txt, so Manager installs nothing on top of the code - the mesh half of this pack needs trimesh installed by hand, even though this node doesn't. The startup banner [Antonioilev_Light_pack] Loaded N nodes (M failed) tells you what else failed.
One nice touch: IS_CHANGED returns the current time, so the loader re-reads the folder on every queue. Re-render your maps, hit queue again, no restart needed.
Practical notes
Keep the folder-as-convention honest: one prefix, one channel tag, consistent filenames, numbers at the end. The moment a channel has a different naming style you get the 64Γ64 placeholder and a workflow that quietly processes nothing.
And if your pipeline produces a fourth channel later (roughness, AO, a mask), this node won't carry it - you'll need a second loader for the extras, with a mask string that points at the same folder.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path_mask | STRING | /mnt/l/Game_2/Art/Chars/Char1/MVs/Head/MV_head_ | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| bc | IMAGE | β |
| nm | IMAGE | β |
| pos | IMAGE | β |