Nodes/ComfyUI-QwenVL-Utils/Multiple Paths Input
ComfyUI Node

Multiple Paths Input

Batch a thousand files into one path list

By AkihaTatsu·Created 7 months ago·Updated 6 months ago· 0
Multiple Paths Input
  • path_1
  • paths
inputcount1
sample_fps1
max_frames2
use_total_framestrue
use_original_fps_as_sample_fpstrue

Captioning one image is easy. Captioning your whole training folder is where you start craving a "give me every file at once" node, and that's exactly what this is. Multiple Paths Input (class QwenVLUtils_MultiplePathsInput) takes up to a thousand file paths and packs them into a single paths output - one PATH object the rest of the graph can loop over. It's the batch plumbing of the QwenVL-Utils pack.

The node's own description is the best summary: "Creates a path batch from multiple paths. Set how many inputs the node has with inputcount and click update."

What you set

  • inputcount - how many path inputs the node exposes, 1 to 1000. This is the knob that's easy to miss: change it, then click the node's update button, and the path_1, path_2, … inputs appear (or disappear).
  • path_1 and friends - each is a file path. Images and videos both accepted; anything else gets skipped with a message in the console.
  • sample_fps (default 1) and max_frames (default 2) - the sampling settings applied to video entries.
  • use_total_frames (default true) - use every frame in the video instead of capping at max_frames.
  • use_original_fps_as_sample_fps (default true) - keep the video's own FPS rather than forcing sample_fps.

Supported formats, straight from the source: images JPG/JPEG/PNG/BMP/TIFF/WebP/GIF, videos MP4/MKV/MOV/AVI/FLV/WMV/WebM/M4V.

How it works

Each path is probed and turned into a small JSON descriptor. Images become {"type": "image", "image": path}. Videos get opened with OpenCV's VideoCapture to read the real frame count and FPS, and those values feed max_frames / fps in the descriptor - that's what makes the batch smart about video: a 2-minute clip gets its duration preserved, not a flat two frames. All the descriptors come out the other end as one paths list.

That's the design intent, anyway. The honest caveat: the QwenVL model nodes currently accept a single source_path input and don't yet consume a path list in the shipped code, so this node is groundwork for folder-scale captioning more than it is a working batch pipe today. What it definitely works as right now: a clean way to collect a set of paths and hand them to any node that eats a PATH, and a preview of where this pack is clearly heading.

Install

Part of the QwenVL-Utils pack, one install gets you everything:

cd ComfyUI/custom_nodes
git clone https://github.com/AkihaTatsu/ComfyUI-QwenVL-Utils.git
cd ComfyUI-QwenVL-Utils
pip install -r requirements.txt

Or ComfyUI Manager → search "QwenVL Utils" → install → restart. OpenCV (a core dependency) is what does the video probing, so no extra install needed for that.

Gotchas

Two things bite people. First, the update-button dance: set inputcount and click update, or the new inputs won't show. Second, bad paths just silently vanish - the node prints "Could not open video" or "Unsupported file type" to the console and drops them, so check the terminal if your batch comes back shorter than expected. And as noted, don't expect it to drive the QwenVL node's captioning loop end-to-end yet - the wiring to consume paths isn't there in this release.

CategoryQwenVL-Utils/Input

Inputs (6)

NameTypeDefaultDescription
inputcountINT11–1000
path_1PATH
sample_fpsoptINT11–1000
max_framesoptINT22–9223372036854776000
use_total_framesoptBOOLEANtrue
use_original_fps_as_sample_fpsoptBOOLEANtrue

Outputs (1)

NameTypeDescription
pathsPATH