Nodes/WanVideoLooper/WanVideo Looper Prompts
ComfyUI Node

WanVideo Looper Prompts

One prompt per line, one video segment each

By SquirrelRat·Created 10 months ago·Updated 8 months ago· 10
WanVideo Looper Prompts
    • prompt_list
    • negative_prompt
    prompts
    negative_prompt
    enable_prefix_suffixtrue
    prefix
    suffix

    The WanVideo Looper Prompts node exists so you don't have to wire up ten separate conditioning chains. The main looper node runs one video segment per prompt, and this is the node that turns your prompt list into that segment list. Type one prompt per line and every line becomes a video segment; empty lines are skipped. That's the whole job, and it does it well.

    It's part of the SquirrelRat/WanVideoLooper pack and lives right next to the looper in the graph. Its two outputs - prompt_list and negative_prompt - plug straight into the looper's positive_prompts and negative_prompt inputs. It also has a prompts box and a negative_prompt box, both multiline. One useful detail: the prefix and suffix are applied to the negative prompt too, which is a nice way to bake a global quality/style line into every segment without typing it a dozen times. The enable_prefix_suffix toggle (on by default) turns that off if you want the raw lines.

    The mechanism

    Under the hood it's dead simple: split the text on newlines, strip whitespace, drop empties, and for each surviving line prepend the prefix and append the suffix, joined with commas. The processed list goes out prompt_list; the processed negative goes out as a single string. No model involved, no VRAM cost, nothing to trip over - which is exactly what you want from a text helper sitting in front of a node that renders 20 minutes per segment.

    The profile system is the part worth knowing about. Save/load/delete are handled in the front-end JS and persist to your browser's localStorage, so a saved profile is tied to the machine and browser you saved it on. That's great for keeping a stable character setup between sessions, and it's a trap if you expect your profiles to ride along inside the workflow JSON you share with someone else - they don't.

    Common gotchas

    • One line is a whole segment. If the looper is running far more loops than you expected, count your lines. The looper samples per line, and a stray newline at the end of the box is harmless (it's stripped), but ten lines means ten full video renders.
    • Empty box still runs. If prompts is empty, the node doesn't error - it logs a warning and emits a list containing one empty prompt, and the looper will happily sample a segment for it. Clear it only if you mean to skip.
    • Prefix/suffix and commas. The join uses commas, so if a prompt line already ends with a comma you'll get a doubled one, which is harmless but ugly in logs.

    Install it with the rest of the pack - Manager search "WanVideoLooper", or git clone https://github.com/SquirrelRat/WanVideoLooper into ComfyUI/custom_nodes/ and restart. It has no model dependencies of its own; it's pure plumbing in front of the looper. If your only complaint is that long Wan video means typing a prompt per shot, this is the node that fixes it.

    CategoryWanVideoLooper

    Inputs (5)

    NameTypeDefaultDescription
    promptsSTRINGEnter one positive prompt per line. Empty lines are ignored.
    negative_promptSTRINGEnter the global negative prompt.
    enable_prefix_suffixBOOLEANtrueEnable the prefix and suffix string.
    prefixSTRINGText to add BEFORE each prompt line (positive and negative).
    suffixSTRINGText to add AFTER each prompt line (positive and negative).

    Outputs (2)

    NameTypeDescription
    prompt_list*
    negative_promptSTRING