Nodes/ComfyUI_QWEN3VL_API/QWEN3-VL 加载视频(文件夹)
ComfyUI Node

QWEN3-VL 加载视频(文件夹)

Feed Qwen3-VL an entire folder of videos in one go

By flywhale-666·Created 10 months ago·Updated 9 months ago· 6
QWEN3-VL 加载视频(文件夹)
    • videos
    • file_paths
    folder_path
    video_limit0
    start_index0
    sort_method

    If you're here, it's probably because you've got a folder of clips and a Qwen3-VL node that's asking for a video, and you don't want to type file paths out by hand for every single one. That's this node's entire job: it turns a folder into a ready-to-analyze list, sorted the way you want, in one step.

    It's part of the ComfyUI_QWEN3VL_API pack, which is an API wrapper for Alibaba's DashScope - no local model, no weights, no VRAM. The pack's whole pitch is that because Qwen3-VL runs in the cloud, you never have to touch ComfyUI's transformers or fight version conflicts just to get vision working. This loader is the batch front-end for the video side of that.

    How it works

    The mechanism is gloriously boring, and that's a compliment. The node globs the folder you give it for video files - mp4, avi, mov, mkv, webm, flv, wmv, mpeg, mpg - sorts them, and returns their file paths as a list. The "VIDEO" output is really a list of file path strings (ComfyUI's VIDEO type is path-based, not decoded frames), so both videos and file_paths carry the same paths. Don't panic if that looks redundant; the first is the one you wire into a video node, the second is handy for feeding the file name back into a prompt or logging.

    Sorting matters more than it sounds. With "None" you get whatever order the OS glob happened to return, which is effectively random once you have more than a handful of files. "Numerical (ASC)" is the one you want for clip_01.mp4, clip_02.mp4 style names - it pulls the numbers out of each filename and sorts on those, so clip_10 lands after clip_9 instead of beside it. "Datetime" sorts by file modification time, which is great when your filenames are meaningless but your folder history isn't.

    The inputs that actually matter

    • folder_path - absolute path to the folder. It must exist; the node returns an empty list and prints an error if it can't find it.
    • sort_method - pick "Numerical (ASC)" for numbered clips, "Datetime" for anything else you can't name.
    • video_limit - 0 means no limit. Set this before you go wild, because every video you send downstream is a paid API call.
    • start_index - skip the first N videos. Useful for resuming a batch where you left off.

    Outputs: videos (VIDEO list) and file_paths (STRING list). Wire videos into the QWEN3VL_Video node's optional video input and it takes over from there.

    How to install it

    Either way you do it, there are no model downloads - this pack is a thin OpenAI-compatible client, and its only real dependency is openai:

    cd ComfyUI/custom_nodes
    git clone https://github.com/flywhale-666/ComfyUI_QWEN3VL_API
    cd ComfyUI_QWEN3VL_API
    pip install -r requirements.txt
    

    Then restart ComfyUI. Or just search "ComfyUI_QWEN3VL_API" in ComfyUI Manager and hit install - same result, less typing.

    Troubleshooting

    • Empty list, no obvious error - check the folder path is absolute and correct. The node only reads one directory level; it does not recurse into subfolders.
    • Wrong order with named clips - switch from "None" to a real sort method. This is the single most common "why did it pick that one first" complaint.
    • Videos load but the next node fails - remember the VIDEO output is paths, not frames. If something downstream expects decoded video, it's the wrong tool. This node feeds QWEN3VL_Video, which is exactly the pairing it was built for.
    • It's small and new - this is a single-commit pack with essentially no community footprint yet, so treat it as working-as-shipped rather than battle-tested. The code is short and open; read it if something surprises you.

    One habit worth forming: cap video_limit before you hit run, not after. Video analysis bills per call on DashScope, and a folder of thirty clips is thirty API calls whether you meant to make them or not.

    Category🤖QWEN3VL_API

    Inputs (4)

    NameTypeDefaultDescription
    folder_pathSTRING
    video_limitINT00–10000
    start_indexINT00–10000
    sort_methodCOMBO7 options: None, Alphabetical (ASC), Alphabetical (DESC), Numerical (ASC), Numerical (DESC), Datetime (ASC), +1

    Outputs (2)

    NameTypeDescription
    videosVIDEO
    file_pathsSTRING