Nodes/24oiduts-ComfyUI/Studio42 Video PatchLift Loader
ComfyUI Node

Studio42 Video PatchLift Loader

Extract the same patch from every frame of a video

By GeekyGhost·Created 12 months ago·Updated 10 months ago· 0
Studio42 Video PatchLift Loader
    • video_frames
    • preview_frames
    • patch_frames
    • patch_masks
    • patch_x
    • patch_y
    • patch_width
    • patch_height
    • fps
    • frame_count
    • audio
    video
    patch_x256
    patch_y256
    patch_width256
    patch_height256
    patch_shaperectangle
    frame_load_cap0
    skip_first_frames0
    select_every_nth1
    force_rate0.0
    custom_width0
    custom_height0
    grid_size32
    grid_opacity0.3
    selection_color#FF0000
    selection_thickness3
    show_coordinatestrue
    corner_radius20
    maintain_aspectfalse
    preview_scale1.00

    Studio42 Video PatchLift Loader is the video version of the pack's PatchLift Loader: it loads a video, turns it into frames, and extracts the same patch region across every frame - with a per-frame visual overlay so you can see exactly what region is being tracked. Pair it with the pack's Video PatchDrop and you can lift a region from a clip, process it, and drop it back with temporal consistency.

    This is the node you reach for when the thing you want to edit doesn't stay still - a face that moves across the frame, a logo, a region that needs per-frame effects. It's not optical-flow tracking; it's a fixed region applied consistently across frames, which is the honest, predictable version of the job.

    What you set

    • video - the file to load (MP4, WebM, MKV, AVI, MOV, GIF per the pack's docs).
    • patch_x / patch_y - the region's position in the frame, 0–4096.
    • patch_width / patch_height - 16–1024.
    • patch_shape - rectangle, circle, rounded_rectangle, with corner_radius.

    The video-control extras matter for long or heavy files:

    • frame_load_cap - limit total frames loaded (0 = unlimited). The memory saver.
    • skip_first_frames - drop the first N frames.
    • select_every_nth - sample every Nth frame (e.g., 2 = half the framerate).
    • force_rate - override the frame rate.
    • custom_width / custom_height - resize the frames on load.

    And the selection visuals, mirroring the image version: grid_size, grid_opacity, selection_color, selection_thickness, show_coordinates, corner_radius, preview scaling.

    What comes out

    Ten outputs - the useful ones: video_frames (all frames as an IMAGE batch), preview_frames (with the overlay), patch_frames (the extracted patch per frame), patch_masks (per-frame masks for non-rectangular shapes), the patch_x/y/width/height INTs, plus fps, frame_count, and audio (the video's audio track, if any, as AUDIO). That last one is a nice bonus - you don't need a separate audio loader for a video file.

    The honest limits

    The patch region is fixed across frames, so it works great when the region stays put and drifts when it doesn't. For tracking a moving subject, you'd want a tracker feeding per-frame coordinates instead. Within its scope - "same region, every frame" - it's exactly right, and frame_load_cap makes it usable on long clips.

    Installing it

    Same pack, 24oiduts-ComfyUI:

    • ComfyUI Manager: search 24oiduts, install, restart.
    • Manual:
      cd ComfyUI/custom_nodes/
      git clone https://github.com/GeekyGhost/24oiduts-ComfyUI
      pip install -r 24oiduts-ComfyUI/requirements.txt
      then restart.

    This is the node with the heaviest real dependency list: it needs opencv-python and ffmpeg-python, plus a system FFmpeg for the codec work. The pack's __init__.py even tells you when it can't load - the whole video section disappears with a "install opencv-python, ffmpeg-python" message. The GitHub README is a stale Studio42 template; don't let its WIP banner scare you.

    Troubleshooting

    • Video nodes missing from the menu - the pack's video section failed to import; install opencv-python and ffmpeg-python, plus system FFmpeg, then restart.
    • Out of memory on long clips - set frame_load_cap and select_every_nth.
    • Patch drifts from the subject - expected with a fixed region; keep the region locked to a stationary part of the frame or add per-frame coordinates upstream.

    Lift a region across a whole clip, keep the audio, and hand it to Video PatchDrop - that's the pipeline this node exists for.

    CategoryStudio42/Video Processing

    Inputs (20)

    NameTypeDefaultDescription
    videoCOMBOVideo file to load and extract patches from
    patch_xINT2560–4096
    patch_yINT2560–4096
    patch_widthINT25616–1024
    patch_heightINT25616–1024
    patch_shapeCOMBOrectangle3 options: rectangle, circle, rounded_rectangle
    frame_load_capoptINT00–999999
    skip_first_framesoptINT00–999999
    select_every_nthoptINT11–999
    force_rateoptFLOAT0.00–999
    custom_widthoptINT00–8192
    custom_heightoptINT00–8192
    grid_sizeoptINT328–128
    grid_opacityoptFLOAT0.30–1
    selection_coloroptSTRING#FF0000
    selection_thicknessoptINT31–10
    show_coordinatesoptBOOLEANtrue
    corner_radiusoptINT205–100
    maintain_aspectoptBOOLEANfalse
    preview_scaleoptFLOAT1.000.25–2

    Outputs (11)

    NameTypeDescription
    video_framesIMAGE
    preview_framesIMAGE
    patch_framesIMAGE
    patch_masksMASK
    patch_xINT
    patch_yINT
    patch_widthINT
    patch_heightINT
    fpsFLOAT
    frame_countINT
    audioAUDIO