Nodes/ComfyUI-KYNode/load video from path
ComfyUI Node

load video from path

A from-scratch Load Video, tuned per model

By yorkane·Created 2 years ago·Updated 6 months ago· 10
load video from path
  • Video_object
  • IMAGE
  • mask
  • audio
  • video_info
  • video_path_url
  • fps
  • frame_count
video
force_rate0
custom_width0
custom_height0
frame_load_cap0
start_time0.000
formatAnimateDiff
color_spaceNone
pix_fmtrgba64le

The pack's README describes this plainly: it's built to mimic ComfyUI's own official Load Video node - load a video from your input/output folders, get back frames, mask, audio, and metadata. Where it earns its own name is a per-video-model tuning layer the stock node doesn't have: a format picker for AnimateDiff, Mochi, LTXV, Hunyuan, Cosmos, and Wan, plus explicit color space and pixel format controls.

Why the format options exist

Different video diffusion pipelines have historically wanted slightly different frame conventions - expected color space, whether alpha is preserved, how pixel data is packed. Rather than making you set those correctly by hand every time you switch which model you're feeding, format gives you a preset matching the target pipeline, and color_space (bt709/bt601/smpte240m/bt2020) and pix_fmt (rgba64le, rgb24, rgba, bgra, yuva420p, yuva422p, yuva444p) let you override manually when you know exactly what you need. Leave these at their defaults - format=AnimateDiff, color_space=None, pix_fmt=rgba64le - unless you specifically know your target model wants something different; they're tuning knobs, not artistic settings.

One more compatibility note worth flagging directly: the video_info output is typed VHS_VIDEOINFO - the same type ComfyUI-VideoHelperSuite uses for its own video metadata. That means this node's output can drop straight into workflows built around VideoHelperSuite's loader without breaking anything downstream that reads that type.

Inputs and outputs

Required: video (the file, per the README selected via a folder dropdown the way the stock Load Video node works), force_rate (0 keeps the source's original rate; anything else re-times it), custom_width/custom_height (0 means keep original), frame_load_cap (0 loads every frame - set an actual number to cap it), and start_time (in seconds, to skip ahead before loading).

Optional: Video_object (a VIDEO-typed input, an alternate entry point if you already have a loaded video object rather than a path) plus format, color_space, and pix_fmt as covered above.

Outputs: IMAGE (the frames), mask (from any alpha channel), audio, video_info (VHS_VIDEOINFO), video_path_url, fps, and frame_count.

Installing it

ComfyUI Manager: search ComfyUI-KYNode, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/yorkane/ComfyUI-KYNode

Restart ComfyUI. This node likely relies on ffmpeg or a similar decoder under the hood for the video-reading itself, consistent with the rest of the pack's video tooling, though the README doesn't spell out a formal dependency list - if it fails to load a file that plays fine elsewhere, check that ffmpeg is on your PATH.

Common issues

Don't be alarmed that force_rate, custom_width, and custom_height all default to 0 - that's "keep the source as-is," not a broken/unset value.

frame_load_cap at 0 loads the entire video, which can blow through your available VRAM/RAM on a long clip - set a real cap while iterating on a workflow, and only load the full video once you're ready for a real run.

If frames look color-shifted or oddly packed once they hit your sampler, that's the format/color_space/pix_fmt trio to check first - they exist precisely because different video models expect different conventions, and a mismatch here is the most likely explanation for an otherwise-correct-looking load producing wrong colors downstream.

CategoryKY_Video

Inputs (10)

NameTypeDefaultDescription
videoSTRING
force_rateFLOAT00–60
custom_widthINT00–8192
custom_heightINT00–8192
frame_load_capINT00–9007199254740991
start_timeFLOAT0.0000–9007199254740991
Video_objectoptVIDEO
formatoptCOMBOAnimateDiff7 options: None, AnimateDiff, Mochi, LTXV, Hunyuan, Cosmos, +1
color_spaceoptCOMBONone5 options: None, bt709, bt601, smpte240m, bt2020
pix_fmtoptCOMBOrgba64le7 options: rgba64le, rgb24, rgba, bgra, yuva420p, yuva422p, +1

Outputs (7)

NameTypeDescription
IMAGEIMAGE
maskMASK
audioAUDIO
video_infoVHS_VIDEOINFO
video_path_urlSTRING
fpsFLOAT
frame_countINT