Nodes/ComfyUI-JNodes/Load Visual Media From Path
ComfyUI Node

Load Visual Media From Path

Load an image or video straight from a file path

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Load Visual Media From Path
    • IMAGE
    • original_media_info
    • output_media_info
    media_path/insert/path/here.ext
    start_at_n0
    start_at_unit
    sample_next_n0
    sample_next_unit
    frame_skip0
    discard_transparencytrue

    ComfyUI's built-in LoadImage wants you to click a widget and pick from the input folder. This node skips that entirely - give it a filesystem path (to an image or a video) and it loads the frames directly, no upload step, no drag-and-drop. That matters more than it sounds: it's what lets you point a workflow at a video sitting anywhere on disk, or chain workflows together by feeding one run's output path straight into the next run's input, without round-tripping through the browser.

    It's the flagship of JNodes' media nodes, and per the pack's own credits it's built on the bones of Kosinkadink's VideoHelperSuite (VHS) - if you've used VHS's video loaders, the frame-windowing controls here will feel familiar.

    How it works

    Point media_path at a file. If it's a still image you get one frame back; if it's a video or an animated format, the node decodes it and gives you a stack of frames as a single IMAGE batch. The real feature is that you don't have to take the whole thing: start_at_n plus start_at_unit (frames or seconds) sets where reading begins, and sample_next_n plus sample_next_unit sets how much to grab from there - mix and match, so "give me 16 frames starting 3 seconds in" is one node, not a video loader plus a slicer. Leave sample_next_n at 0 and it just reads everything from the start point onward. frame_skip thins the output (skip every Nth frame, useful for lightening a heavy video before it hits your VRAM), and discard_transparency flattens alpha so you don't get a stray channel breaking a downstream node that expects RGB.

    Alongside the frames you get two JNODES_MEDIA_INFO outputs - one describing the source file as it actually is (original_media_info), one describing what you ended up sampling (output_media_info). Feed either into JNodes_MediaInfoToString to print it, or JNodes_BreakMediaInfo to pull out frame_count, fps, duration, width, height and friends individually.

    The inputs and outputs

    • media_path (STRING) - path to the image or video file.
    • start_at_n / start_at_unit - where to begin (in frames or seconds).
    • sample_next_n / sample_next_unit - how much to read from there (0 = the rest).
    • frame_skip - skip N frames between each one you keep.
    • discard_transparency - flatten alpha (on by default).
    • IMAGE output - the loaded frame batch.
    • original_media_info / output_media_info (JNODES_MEDIA_INFO) - metadata about the source and what you sampled.

    How to install it

    Via ComfyUI Manager: Install Custom Nodes, search "JNodes", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JaredTherriault/ComfyUI-JNodes
    pip install -r ComfyUI-JNodes/requirements.txt
    

    then restart ComfyUI. No models to download, but decent video support depends on the same underlying tooling VHS-style loaders lean on - make sure your Python environment can actually decode the codecs you're feeding it (a fresh install with a minimal ffmpeg build is the usual place this bites).

    Common issues & troubleshooting

    A path that works in your file browser can still fail here. This is a server-side path, not a browser upload - it has to exist and be readable from wherever ComfyUI's process is actually running. If ComfyUI is in a container or on a remote machine, /insert/path/here.ext-style absolute paths on your own laptop won't resolve; you need the path as the server sees it.

    Silent frame gaps. If your video looks choppier than the source, check frame_skip before blaming the codec - it's easy to leave a nonzero value set from a previous experiment.

    Unexpected color fringing on PNGs with transparency. That's discard_transparency at work - it's on by default specifically to keep downstream nodes from choking on an alpha channel they don't expect. Turn it off if you actually need the alpha.

    start_at_unit/sample_next_unit mismatched. Frames and seconds aren't interchangeable, and it's an easy typo to set start_at_unit to seconds while still thinking in frame counts. If your output starts in the wrong place, that's the first thing to check.

    Categorysd

    Inputs (7)

    NameTypeDefaultDescription
    media_pathSTRING/insert/path/here.ext
    start_at_nINT0
    start_at_unitCOMBO2 options: frames, seconds
    sample_next_nINT0
    sample_next_unitCOMBO2 options: frames, seconds
    frame_skipINT0
    discard_transparencyBOOLEANtrue

    Outputs (3)

    NameTypeDescription
    IMAGEIMAGE
    original_media_infoJNODES_MEDIA_INFO
    output_media_infoJNODES_MEDIA_INFO