Nodes/ComfyUI_Simple_Qwen3-VL-gguf/πŸ“Έ Load Video Fragment
ComfyUI Node

πŸ“Έ Load Video Fragment

Clip a slice of a video into frames (and audio) for a local Qwen VLM

By KLL535Β·Created 10 months agoΒ·Updated 6 days agoΒ· 87
πŸ“Έ Load Video Fragment
    • frames
    • count
    • duration
    • fps
    • width
    • height
    • audio
    • sample_rate
    β—„video_pathβ–Ί
    β—„timestamp0:00:00β–Ί
    β—„duration_sec5.00β–Ί
    β—„target_fps16.0β–Ί
    β—„enable_resizefalseβ–Ί
    β—„longer_size400β–Ί
    β—„megapixels0.0β–Ί
    β—„size_multiple2β–Ί
    β—„enable_cropfalseβ–Ί
    β—„crop_x10.00β–Ί
    β—„crop_y10.00β–Ί
    β—„crop_x21.00β–Ί
    β—„crop_y21.00β–Ί
    β—„enable_audiofalseβ–Ί

    Every other video loader in ComfyUI wants to copy your file into the input folder first. This one refuses, and that's the whole pitch. Load Video Fragment reads a video straight from its path on disk - your LM Studio stash, a 4GB render you don't want duplicated, a file on a network drive - and pulls out a specific slice of it as frames, optionally cropped, resized, and with the audio track extracted alongside. It belongs to the SimpleQwenVL pack from KLL535, and it exists to feed that pack's Simple Qwen-VL node, which turns a clip into a description (or a prompt) using a local GGUF vision-language model.

    Why do you want a fragment instead of the whole thing? Because these VLM nodes don't watch video. They eat a pile of JPEG frames, and every frame costs tokens in the model's context window. A minute of footage at 30fps is 1,800 frames - that's not a video analysis, that's an out-of-memory crash. The author's max_frames config on the VLM node (24 by default) will cap and downscale your input, but you'll get better, faster results by only extracting the part you actually care about. Cut first, ask questions second.

    The inputs that matter

    Set the fragment with three fields, everything else is polish:

    • video_path - full path to the file, or hit the browse button. No copying to input, which is why it handles files of any size.
    • timestamp - where to start, as HH:MM:SS or MM:SS. Fractional parts are fine, so 0:00:00.5 works.
    • duration_sec - how much footage to grab (default 5).
    • target_fps - frame extraction rate (default 16). Duration Γ— FPS is your frame count, and that number is what ends up in the context window.

    The rest is optional and self-explanatory once you see it. enable_resize unlocks longer_size (max side in px), megapixels (target area), and size_multiple - forcing dimensions to a multiple of 2/8/16/32/64 keeps frame sizes clean for the encoder. enable_crop lets you cut to a region using normalized coordinates (crop_x1, crop_y1, crop_x2, crop_y2, all 0–1), handy when the action is only happening in one corner. enable_audio pulls the soundtrack out so a Gemma4 or other audio-capable model can hear it too.

    What it outputs

    • frames (IMAGE) - wire this into the VLM node's video input. This is the main path; the batch of frames becomes the JPEG data-URIs the model reads.
    • count, duration, fps, width, height - metadata, useful for feeding {frame_num} and {width}/{height} placeholders into your prompt, or for sanity-checking what got extracted.
    • audio (AUDIO) and sample_rate - only populated when enable_audio is on. Goes to the VLM's audio input.

    One wiring note: the VLM node's video input needs a recent ComfyUI that transfers video as a file. The author explicitly didn't implement the old tensor-based transfer, so if the video input silently does nothing, update ComfyUI before blaming the node.

    Installing it

    The node ships with the pack, so install once:

    cd path_to_comfyui/ComfyUI/custom_nodes
    git clone https://github.com/KLL535/ComfyUI_Simple_Qwen3-VL-gguf
    

    Or just search ComfyUI_Simple_Qwen3-VL-gguf in ComfyUI Manager. Restart ComfyUI, refresh the frontend.

    The real cost isn't the clone - it's the dependency. This pack doesn't work with the stock llama-cpp-python from PyPI, which is stale and never got Qwen3 support. You need JamePeng's fork, and the version has to match your model: 0.3.17+ for Qwen3-VL, 0.3.30+ for Qwen3.5, 0.3.35+ for Gemma4. The README's recommended route is building it from source with CUDA (CMAKE_ARGS=-DGGML_CUDA=on, pick the right compute capability for your GPU), which takes 30–60 minutes without Ninja. Prebuilt wheels exist for the impatient, but they often ship without CPU-acceleration bits, so n_cpu_moe/cpu_moe won't help you.

    Where people get burned

    Context is the trap. max_tokens + frames Γ— image_max_tokens has to fit in n_ctx (8192 default). Keep fragments short - 5–15 seconds at 4–8 fps is plenty for a caption - and if you crank target_fps up to 200 because it's there, expect the model to see a memory error, not a movie. Frame quality for the JPEG pass is tunable via the frame_quality config (75 default). And if enable_audio produces nothing, check that your model actually supports audio - plain Qwen3-VL text/image models don't, and you need the newest llama.cpp fork for the ones that do.

    Category🌐 SimpleQwenVL

    Inputs (14)

    NameTypeDefaultDescription
    video_pathSTRINGFull path to the video file or click the button to select
    timestampSTRING0:00:00Format: HH:MM:SS or MM:SS. Fractional parts are acceptable: 1:30:45.5
    duration_secFLOAT5.00β€”
    target_fpsFLOAT16.01–200β€”
    enable_resizeoptBOOLEANfalseβ€”
    longer_sizeoptINT4000–16384Maximum side (width or height). 0 = do not resize
    megapixelsoptFLOAT0.00–100Target area in megapixels. 0 = do not resize.
    size_multipleoptINT21–8192Multiples of sizes (2, 8, 16, 32, 64). The width and height will be multiples of this number.
    enable_cropoptBOOLEANfalseβ€”
    crop_x1optFLOAT0.000–1β€”
    crop_y1optFLOAT0.000–1β€”
    crop_x2optFLOAT1.000–1β€”
    crop_y2optFLOAT1.000–1β€”
    enable_audiooptBOOLEANfalseβ€”

    Outputs (8)

    NameTypeDescription
    framesIMAGEβ€”
    countINTβ€”
    durationFLOATβ€”
    fpsFLOATβ€”
    widthINTβ€”
    heightINTβ€”
    audioAUDIOβ€”
    sample_rateFLOATβ€”