Nodes/ComfyUI-TJ_NODE/MiniMax H3 Prompt Queue (TJ)
ComfyUI Node

MiniMax H3 Prompt Queue (TJ)

The prompt queue that runs a whole H3 shoot without you touching the Queue button

By designloves2·Created 3 months ago·Updated 5 days ago· 13
MiniMax H3 Prompt Queue (TJ)
    • prompt
    • index
    • total_count
    auto_settrue
    prompt_count3
    current_index1
    current_queue0
    prompt_1
    prompt_2
    prompt_3
    prompt_4
    prompt_5
    prompt_6
    prompt_7
    prompt_8
    prompt_9
    prompt_10
    prompt_11
    prompt_12
    prompt_13
    prompt_14
    prompt_15
    prompt_16
    prompt_17
    prompt_18
    prompt_19
    prompt_20

    If you're generating a MiniMax H3 video, you usually want several clips - one per prompt, one per shot, one per line of a storyboard. Clicking Queue, waiting two minutes, changing the prompt, clicking Queue again gets old fast. MiniMax H3 Prompt Queue (TJ) is the node that automates that loop: up to 20 prompt slots, and it advances to the next one and re-queues itself every time a run finishes.

    Here's the mechanism, because it's the interesting part. The Python side is deliberately dumb - it just exposes the slots and returns whichever prompt matches the current index. All the "run finished, submit the next clip" logic lives in the pack's frontend JS (web/prompt_queue_tj.js), which watches the executing/status websocket events and, when a run completes, calls app.queuePrompt() again with the next index. Crucially, it doesn't monkey-patch queuePrompt - it just calls it - so it won't collide with Multi Switch's queue hook if you use both in one workflow. The node also forces itself to always re-run (IS_CHANGED returns NaN), because the JS is mutating current_index between runs and ComfyUI would otherwise happily serve you a cached stale prompt.

    The inputs you'll actually touch:

    • prompt_count - how many of the 20 slots are active (1–20).
    • current_index - which slot is live right now; the JS bumps this as it goes.
    • current_queue - a position counter the JS uses to track the loop.
    • prompt_1prompt_20 - the multiline prompt texts themselves. Most people never use more than a handful.

    Outputs are what make it a control hub rather than just a text box:

    • prompt - the active prompt string. Wire it into a sampler/sequencer.
    • index - the 1-based clip number.
    • total_count - the total number of prompts.

    In the H3 workflow, index and total_count are the glue: TJ_H3_Output uses them to know when it's seen the last clip of an One-Take sequence (and should stitch), and TJ_H3_LoadLatentCheckpoint uses index to know clip 1 from clip 2 (the first clip tolerates a missing checkpoint file, later ones don't).

    One honest caveat: "automatically keeps queuing" means the queue runs until it's done, whether or not you're watching. On a long H3 shoot that's a lot of GPU-hours if you forgot to fix a prompt. Know your loop, and use the queue count or the Stop button when you step away. It's also worth noting this node isn't H3-exclusive - nothing in it knows about video - but in practice it exists to drive the H3 nodes in this pack, and that's where it shines.

    Install

    Part of ComfyUI-TJ_NODE. ComfyUI Manager → search "ComfyUI-TJ_NODE", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/designloves2/ComfyUI-TJ_NODE
    

    Then restart. The queue logic is frontend-only, so no extra Python packages are needed for this node.

    Troubleshooting

    • It stops after one run - the pack's web/ JS isn't loading. Check the browser console for a JS error, and confirm you restarted ComfyUI (frontend files are picked up at startup) rather than just reloading the page.
    • You get the same prompt every clip - stale cache; update the pack, since the always-re-run fix is version-dependent.
    • The whole pack feels heavy for this - it is a big pack. You're not wrong; but the H3 loop needs it, and there's no standalone version of this node that I'd recommend over it.
    Category ✨ TJ_Node/Utility

    Inputs (24)

    NameTypeDefaultDescription
    auto_setBOOLEANtrue
    prompt_countINT31–20
    current_indexINT11–20
    current_queueINT00–20
    prompt_1STRING
    prompt_2STRING
    prompt_3STRING
    prompt_4STRING
    prompt_5STRING
    prompt_6STRING
    prompt_7STRING
    prompt_8STRING
    prompt_9STRING
    prompt_10STRING
    prompt_11STRING
    prompt_12STRING
    prompt_13STRING
    prompt_14STRING
    prompt_15STRING
    prompt_16STRING
    prompt_17STRING
    prompt_18STRING
    prompt_19STRING
    prompt_20STRING

    Outputs (3)

    NameTypeDescription
    promptSTRING
    indexINT
    total_countINT