ComfyUI Node Runs on cloud

HyVideo Loop Args

Baking a seamless loop into generation, not stitching one after

By kijai·Created 2 years ago·Updated 12 months ago· 2,595
HyVideo Loop Args
    • loop_args
    shift_skip6
    start_percent0.00
    end_percent1.00

    If you want a video that loops cleanly - last frame flows back into the first frame with no visible seam - there are two very different ways to get there, and this node is the older, more native one. Its own description points straight at the source: "looping through latent shift as shown in YisuiTT/Mobius." The idea is to periodically shift the latent during the denoising process itself, so the model is generating toward a loop from the start, rather than you generating a normal clip and then trying to force the ends to match afterward.

    Like the other *Args nodes in this pack (HyVideoSTG is the same shape), this one is a pure settings bundle - it doesn't touch your video directly, it produces a loop_args object that wires into the wrapper's main sampler node, where the actual shifting happens.

    Three fields, all with tooltips that do most of the explaining for you. shift_skip (default 6) controls how often the shift gets applied - think of it as "skip this many steps between shifts" rather than shifting on every single step. start_percent and end_percent (0 to 1, defaulting to the full range) window the looping effect to a portion of the sampling schedule, same windowing pattern you'll see elsewhere in this pack for guidance-style controls - useful if you want the loop mechanic active only during, say, the later refinement steps rather than from the very first step.

    There's no magic number here that guarantees a clean loop - this is a technique you tune by generating, watching the seam, and adjusting shift_skip or the percent window until it holds up for your specific content. Motion-heavy clips are harder to loop cleanly than mostly-static ones, for the same reason any loop technique struggles more with motion: there's more state that has to line back up.

    Worth knowing before you reach for this: it's not the only game in town anymore. The newer approach, cross-model and not tied to Hunyuan specifically, is the ComfyUI VACE Video Joiner's "Make Loop" toggle, which stitches a transition from a clip's last frame back to its first as a separate post-processing step, working on Wan or LTX footage as easily as Hunyuan. If you're not otherwise committed to this wrapper, that route is worth comparing - it's more flexible about source material, though it's solving the problem after generation rather than during it the way HyVideoLoopArgs does. If you're already deep in a Hunyuan wrapper workflow, this node is the native option and doesn't require adding another pack.

    Installing: ComfyUI Manager, search "HunyuanVideoWrapper," or cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-HunyuanVideoWrapper followed by pip install -r requirements.txt inside the cloned folder, then a restart. Don't skip the pip install - it's the usual reason a Manager-only install leaves nodes missing. No separate model download for this node specifically; it rides on whatever Hunyuan checkpoint your workflow already has loaded.

    CategoryHunyuanVideoWrapper

    Inputs (3)

    NameTypeDefaultDescription
    shift_skipINT6Skip step of latent shift
    start_percentFLOAT0.000–1Start percent of the looping effect
    end_percentFLOAT1.000–1End percent of the looping effect

    Outputs (1)

    NameTypeDescription
    loop_argsLOOPARGS