Nodes/ComfyUI-Apt_Preset/flow_sch_control
ComfyUI Node

flow_sch_control

Turn a seed into a repeating schedule index

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
flow_sch_control
    • seedIndex
    • total
    seed0
    total10

    No description ships with this one, so here's the grounded read: given a seed and a total, it outputs a seedIndex and echoes total back. That's the exact shape of value a scheduling system wants - AnimateDiff-style prompt travel, ControlNet strength scheduling, and IP-Adapter scheduling all consume a per-frame or per-step index cycling through a fixed range, and the pack's own README specifically lists "prompt scheduling, CN scheduling, IPA scheduling" as part of its AnimateDiff-oriented "Controller Stack." flow_sch_control looks like the small utility feeding that index in, using seed as the anchor so the schedule is deterministic and reproducible rather than purely sequential.

    How it works

    Set seed (a huge INT range, same style as ComfyUI's normal seed widgets) as your anchor value, and total as the length of the cycle - how many discrete positions the schedule should have. seedIndex comes out as the derived position within that range, presumably some deterministic function of the seed (so the same seed always maps to the same schedule position, letting you reproduce a specific frame's scheduling state on demand) rather than a plain incrementing counter. total is passed straight through, likely so a single wire can carry both values to whatever scheduling node reads them next.

    Because this behavior isn't documented anywhere in the README, treat the above as an informed guess rather than a spec - if you're building an AnimateDiff or video-scheduling workflow around it, test with a couple of different seed values first and confirm seedIndex actually lands where you expect within the total range.

    Inputs and output

    • seed (INT, required, wide range with negative values allowed) - the anchor value.
    • total (INT, required, default 10, max 5000) - the schedule length.
    • seedIndex (INT, output) - the derived position.
    • total (INT, output) - passed through unchanged.

    Installing it

    Search ComfyUI-Apt_Preset in ComfyUI Manager and install, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart. The README's own dependency step is "double-click install.bat" - a Windows-first instruction, with no requirements.txt visible elsewhere, so on Linux/Mac open that file to see what it installs and mirror it manually in your ComfyUI venv. If you're using this alongside the pack's AnimateDiff-style scheduling nodes, note that ControlNet schedule control specifically requires ComfyUI-Advanced-ControlNet installed separately, per the README - this node itself doesn't need it, but whatever consumes its output for CN scheduling likely does.

    Common issues

    Since neither seedIndex's formula nor mode-like behavior is documented, don't assume it matches how a different pack's scheduling index works - verify with a small total and a couple of known seeds before trusting it in a long AnimateDiff run.

    If a downstream node expects seedIndex in a specific range or format and errors out, double-check total first - it directly bounds what seedIndex can produce.

    And the pack-wide caveat: this is one node in a large, actively developed package, and an import error elsewhere in the pack can take this node down too. If it's missing after install, check the ComfyUI console at boot for the real traceback.

    CategoryApt_Preset/flow

    Inputs (2)

    NameTypeDefaultDescription
    seedINT0-999999–18446744073709550000
    totalINT100–5000

    Outputs (2)

    NameTypeDescription
    seedIndexINT
    totalINT