Nodes/ComfyUI-Apt_Preset/flow_QueueTrigger
ComfyUI Node

flow_QueueTrigger

The old manual-requeue loop counter (deprecated)

By cardenluoĀ·Created 2 years agoĀ·Updated 17 days agoĀ· 309
flow_QueueTrigger
    • Index
    • total
    ā—„Index0ā–ŗ
    ā—„total10ā–ŗ
    ā—„modetrueā–ŗ

    This one's filed under the pack's own "Deprecated" category, and the reason isn't hard to guess: it's a loop counter built for the old way of faking iteration in ComfyUI - hit "Queue Prompt" repeatedly and let a node track which pass you're on - and this same pack now ships flow_forStart/flow_forEnd, a real single-run for-loop pair with the exact same shape (a total count plus a running index) but without needing you to click Queue N times by hand. If you're setting up something new, go there instead. If you're maintaining a workflow that already uses this node, here's what it's doing.

    What it does

    No description ships with it, but the three parameters make the pattern clear: Index and total mirror each other on the way in and out, and mode is a boolean. The likely mechanism - standard for this style of pre-loop-primitive node - is that it remembers which index it's on across successive queue runs (probably via ComfyUI's node-widget persistence, since there's no external state store implied anywhere in the schema) and increments it each time, up to total, so downstream nodes can read Index to vary their behavior per run - a different seed, a different item from a list, whatever your workflow needs to change on each manual pass.

    Inputs and output

    • Index (INT, default 0) - the current position.
    • total (INT, default 10) - how many passes you're planning.
    • mode (BOOLEAN, default true) - undocumented; likely toggles auto-increment behavior or a reset condition.
    • Index, total (outputs) - the same values, passed through for downstream nodes to key off of. It's also flagged as an output node.

    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. This node is pure control state and needs none of the pack's optional extras (GGUF, Advanced-ControlNet, nunchaku, downloaded models).

    Common issues

    Since it's deprecated, expect it to get less attention going forward - a change to how ComfyUI persists widget state between queue runs, for instance, could quietly break this node's counting without the pack's author necessarily patching it. That's a real risk for any node in this category, and it's the strongest argument for switching to flow_forStart/flow_forEnd if your workflow allows it: that pair loops within a single execution instead of depending on manual re-queuing.

    If Index isn't incrementing the way you expect between runs, check mode first - with its behavior undocumented, it's the most likely thing controlling whether the counter advances or resets.

    And the pack-wide caveat: this is one node inside 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/🚫Deprecated/🚫

    Inputs (3)

    NameTypeDefaultDescription
    IndexINT00–18446744073709550000—
    totalINT101–18446744073709550000—
    modeBOOLEANtrue—

    Outputs (2)

    NameTypeDescription
    IndexINT—
    totalINT—