Nodes/comfyui-imgmake/LoadImagesFromPath_lp
ComfyUI Node

LoadImagesFromPath_lp

The VHS-style batch loader that also hands you the file names

By dafeng012·Created 2 years ago·Updated 2 years ago· 17
LoadImagesFromPath_lp
  • meta_batch
  • IMAGE
  • MASK
  • frame_count
  • image_list
directory
image_load_cap0
skip_first_images0
select_every_nth1

LoadImagesFromPath_lp is a beefed-up cousin of the loader in VideoHelperSuite, and if you've ever used VHS you'll recognize it instantly. Point it at any directory on disk and it loads the images as one batched tensor, plus a mask, plus metadata - but with a bonus output the original doesn't have: the file names as a string. That last bit is what makes it fit this pack.

Where would you use it? The classic case is loading an already-generated folder of keyframes - say, output from another workflow, or frames you painted in batch - without copying them into ComfyUI's input directory. The _lp family of nodes in this pack all work with raw paths, which is deliberate: the EBSynth pipeline lives entirely on disk, outside the ComfyUI-managed folders, and this loader is the bridge back in.

The inputs

  • directory - absolute path to the image folder. This is the only required input.
  • image_load_cap - 0 for all images, otherwise load at most N (handy for a quick smoke test on a 1,800-frame folder).
  • skip_first_images - skip the first N files.
  • select_every_nth - load every Nth image (1 = all). Paired with skip, this is how you subsample a frame dump for a fast preview.
  • meta_batch - optional VHS_BatchManager input for compatibility with VideoHelperSuite batch workflows. Leave it unconnected unless you know you need it.

The outputs

  • IMAGE - the batch, all images as one tensor.
  • MASK - a mask tensor; images with an alpha channel get it converted to a mask here.
  • frame_count - INT, how many frames made it in. Great for sanity-checking that skip/cap/nth did what you expected.
  • image_list - STRING, comma-joined file names (without extensions). Feed it into SelectImageName to pull out a specific name.

One wart to know: that image_list only includes .png files, and it's built with a plain directory listing - so it's not sorted, and non-PNGs are silently skipped. If your folder is mixed formats or you need ordered names, the list can disagree with what actually loaded.

Installing it

Same pack, same story - Manager (search comfyui-imgmake) or:

cd ComfyUI/custom_nodes
git clone https://github.com/dafeng012/comfyui-imgmake

Restart. No extra dependencies for this node itself; it leans on ComfyUI internals plus the VHS_BatchManager type (only needed if you actually use the meta_batch input).

Troubleshooting

  • "Directory cannot be found" / "No files in directory" - the node validates up front and refuses bad paths. Note it strips and re-resolves paths, so a relative path may behave differently than an absolute one; use absolutes.
  • Mixed-size images - like the original VHS loader, it upscales everything to the most common size in the folder. Same-size frames (which is what this pack always produces) are the happy path; random-size folders will surprise you.
  • image_list out of order - known behavior, not a bug; it's an unsorted directory listing filtered to PNGs. If order matters for your downstream SelectImageName use, sort the folder's names at the filesystem level (they'll come back in that order on most platforms).

Solid utility node. Not flashy, but it's the difference between "I can chain a folder into the graph" and fighting ComfyUI's input dir.

CategoryIMAGEmake

Inputs (5)

NameTypeDefaultDescription
directorySTRING
image_load_capoptINT00–9007199254740991
skip_first_imagesoptINT00–9007199254740991
select_every_nthoptINT11–9007199254740991
meta_batchoptVHS_BatchManager

Outputs (4)

NameTypeDescription
IMAGEIMAGE
MASKMASK
frame_countINT
image_listSTRING