Nodes/ComfyUI-Advanced-ControlNet/SparseCtrl Spread Method πŸ›‚πŸ…πŸ…’πŸ…
ComfyUI Node Runs on cloud

SparseCtrl Spread Method πŸ›‚πŸ…πŸ…’πŸ…

How sparse hints spread across your frames

By KosinkadinkΒ·Created 3 years agoΒ·Updated 8 days agoΒ· 993
SparseCtrl Spread Method πŸ›‚πŸ…πŸ…’πŸ…
    • SPARSE_METHOD
    β—„spreadβ–Ύβ–Ί

    A tiny node with one decision to make: when you condition only a handful of frames with SparseCtrl, which frames do your hints land on? If you pass in three conditioning images for a 16-frame animation, do they sit at the very start, spread evenly across the whole clip, or cluster in the middle? That placement changes the motion you get, and this node is where you choose it. It outputs a SPARSE_METHOD that plugs into the SparseCtrl loader.

    It's optional - leave it out and SparseCtrl uses its default placement - but it's the difference between "animate outward from a first frame" and "morph between evenly spaced keyframes," so it's worth understanding.

    How it works

    SparseCtrl doesn't condition every frame; it conditions a sparse set and lets the AnimateDiff motion module interpolate the rest. But your conditioning images have to be assigned to actual frame indices, and the spread method is the rule for that assignment. Pick a mode from the dropdown and the node produces a SPARSE_METHOD object encoding it; feed that into the loader's sparse_method input and your hint images get distributed accordingly. The dropdown offers a few distribution strategies - anchoring hints to the beginning, spreading them evenly across the batch, or centering them - so you can match the placement to the kind of motion you're going for.

    The inputs and outputs that matter

    • spread (required, a dropdown) - the distribution strategy. This is the node's entire configuration: choose how your sparse conditioning frames map onto the animation's timeline.

    Output is SPARSE_METHOD, wired into the sparse_method input of the Load SparseCtrl Model node.

    How to install it

    ComfyUI Manager: search ComfyUI-Advanced-ControlNet, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet
    

    then restart. No dependencies - this is a pure configuration node. It only does anything as part of a SparseCtrl workflow, which also needs the SparseCtrl model in ComfyUI/models/controlnet and ComfyUI-AnimateDiff-Evolved.

    Common issues & troubleshooting

    The motion isn't going where you expect. That's usually the spread, not a bug. If you conditioned a first frame and want the animation to grow out of it, anchor the hints to the start; if you're interpolating between keyframes, spread them evenly. Swap the mode and re-run.

    Connecting it did nothing. The output has to reach the loader's sparse_method input, and the spread only matters when you're passing multiple conditioning frames. With a single hint frame there's little for it to distribute.

    You don't strictly need it. SparseCtrl has a default placement, so this node is a refinement. Add it when the default frame assignment isn't giving you the motion you want.

    CategoryAdv-ControlNet πŸ›‚πŸ…πŸ…’πŸ…/SparseCtrl

    Inputs (1)

    NameTypeDefaultDescription
    spreadCOMBO4 options: uniform, starting, ending, center

    Outputs (1)

    NameTypeDescription
    SPARSE_METHODSPARSE_METHODβ€”