Nodes/ComfyUI-LoadAnim-Adv/Load Image/Video
ComfyUI Node

Load Image/Video

The Load Image that finally knows video exists

By SineSwiper·Created 7 months ago·Updated 7 months ago· 0
Load Image/Video
    • images
    • mask
    • audio
    • frame_count
    • fps
    image
    RGBAfalse
    width0
    height0
    keep_aspect_ratio

    ComfyUI's core Load Image node has a blind spot: it's called "Load Image," so it loads images - stills, mostly. The moment you drag a GIF or an MP4 into a workflow, you're off the map. Load Image/Video is the drop-in replacement that behaves the way you already expect Load Image to behave, plus actual animation support. It's from SineSwiper's LoadAnim-Adv pack, and it's the friendlier sibling of Load Image/Video From Path.

    The one real difference from its sibling

    Both nodes are the same loader under the hood. The split is just how you pick the file:

    • Load Image/Video gives you a dropdown of files in ComfyUI's input directory, with an upload button - drag a file into the widget and it copies it there. If you're a "throw files in the ComfyUI input folder" person, this is your node.
    • Load Image/Video From Path takes a typed path string instead, for files anywhere on disk or for paths generated by other nodes.

    Start with this one. If you find yourself wanting to load from an absolute path or from a file-list node, swap to the path variant - same wiring downstream.

    What comes out

    The outputs are where this node earns its keep over stock Load Image:

    • images - an IMAGE tensor. For a video or animated GIF, this is every frame stacked into one tensor, ready for AnimateDiff-style or video-model pipelines.
    • mask - transparency from the alpha channel or a transparent palette index. Always present, even when RGBA is off.
    • audio - the extracted audio track, for video files. Few loaders bother; the catch is most downstream nodes can't do anything with it, so you'll be chasing a video/audio merge node if you want sound.
    • frame_count - how many frames you got. Handy for wiring into scheduling nodes.
    • fps - from metadata, or 0 for stills and metadata-less files.

    Inputs to touch

    • RGBA - default off. Keep it off unless you specifically want a 4-channel image; the mask output already carries the alpha data.
    • width / height - resize targets; 0 keeps the original size. Step is 16.
    • keep_aspect_ratio - crop, pad, or stretch for when the source doesn't match your target ratio. Crop is the safe default; pad uses detected edge color to letterbox, which looks better than black bars for most content.

    Installing

    Via ComfyUI Manager (search ComfyUI-LoadAnim-Adv or "LoadAnim"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SineSwiper/ComfyUI-LoadAnim-Adv.git
    

    Restart ComfyUI. That's it - the pack's only dependencies are torch, numpy, and Pillow, all of which you already have in any working ComfyUI. Video decoding goes through ComfyUI's built-in ffmpeg wrapper, not some extra library you have to babysit.

    Gotchas

    • It loads everything in the file. If you want frames 10 through 20 of a 300-frame clip, drop the output into Select Indexes From Images (same pack) - don't go looking for a frame-range field here, there isn't one.
    • fps of 0 on a still image is normal, not a bug.
    • Animated WebP and multi-frame TIFF work, but the pack is at its best with GIF and video - the formats people actually feed it.

    If you've been doing image-to-video workarounds just to get a video into your graph, this is the node that deletes the workaround.

    CategoryLoadAnimAdv/Loaders

    Inputs (5)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png
    RGBABOOLEANfalseControls whether to include the Alpha channel in the 'image' output. The 'mask' output will always include this data.
    widthINT0Final width of images, after resizing. Zero means to keep the original width.
    heightINT0Final height of images, after resizing. Zero means to keep the original height.
    keep_aspect_ratioCOMBOWhat action to take, when the image doesn't match the expected aspect ratio.

    Outputs (5)

    NameTypeDescription
    imagesIMAGEThe image data, either as a single image or a set of frames.
    maskMASKAny transparency data found in the Alpha channel or transparent palette index.
    audioAUDIOThe audio from the video, if any.
    frame_countINTTotal number of frames loaded from the image.
    fpsFLOATFrames-per-second, as reported from the image metadata. This may be zero, if the data could not be found, or the image doesn't animate.