Nodes/Huelake Nodes/Text Scheduler
ComfyUI Node

Text Scheduler

The Text Scheduler

By huelake·Created 5 months ago·Updated 8 days ago· 0
Text Scheduler
    • STRING
    text_input
    index0

    First, the name is a trap: this is not a sampler scheduler. There's no Karras, no shift, none of the noise-schedule knob-twiddling from ComfyUI's sampler settings. "Scheduler" here means "schedule of texts" - a node that holds a list of prompt lines and hands you one at a time based on a number you feed it. If you Googled this expecting to fix your blurry 4-step Flux output, you're in the wrong place, but it's still a genuinely handy little utility.

    Text Scheduler ships in Huelake Nodes (huelake/ComfyUi-Huelake), a small pack that grew out of kenjiqq's qq-nodes-comfyui and is best known for its XY-grid tooling. This node is the text sidekick to that: it gives you the rotating-input trick you need when you want one workflow to spit out a series of images with different prompts.

    How it works

    The mechanism is embarrassingly simple, which is exactly why it's reliable. You paste a bunch of prompts into the text_input multiline box, one per line. The node splits on newlines, strips whitespace, and drops two kinds of lines: empty ones, and any line containing ----. Then it does lines[index % len(lines)] and returns that string.

    That modulo is the whole personality of the node. Feed it index values 0, 1, 2, 3 and it walks through your list; keep counting past the end and it wraps around instead of erroring. With three prompts, index 7 gives you the same thing as index 1. That's a feature, not a bug - it's what makes the node safe to drive from a sweeping counter where you don't know (or care) how many values you'll throw at it.

    The inputs that matter

    There are only two, and you'll set them both:

    • text_input (multiline STRING) - your list of prompts, one per line. This is the whole payload; there's no tokenizer, no conditioning here, just text.
    • index (INT, default 0) - which line to pull. Range is 0–9999 and it cycles via modulo, so you never need to count your lines exactly.

    The single STRING output wires straight into a CLIP Text Encode's text input - or any other node that eats a string.

    Where you actually use this

    Two patterns are worth knowing. First: batch variation. If you want a character rendered with a dozen different outfits or backgrounds in one queue, keep the rest of the graph identical and feed Text Scheduler's index from anything that increments per batch - the pack's own Any List Iterator or an XY-grid axis works, since this pack's Axis To Any converters can turn an axis value into the INT you need. The pack was built around XY grids, and this node slots into that flow naturally.

    Second, the ---- trick. Because any line containing ---- is filtered out, you can use it as a section divider in a long list: write your prompts, throw a ---- between groups, and use the index to switch "pages." Sloppy but functional.

    Installing it

    The pack is small and dependency-light - requirements.txt is just Pillow and numpy, which you almost certainly already have in your ComfyUI Python environment. No model downloads, no torch tricks, nothing to hunt down.

    • ComfyUI Manager: use Install via git URL and paste https://github.com/huelake/ComfyUi-Huelake, then Install.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/huelake/ComfyUi-Huelake && pip install -r ComfyUi-Huelake/requirements.txt

    Restart ComfyUI either way. You'll find the node under the scheduling category.

    The gotchas

    Because it splits on newlines, each prompt must be one line - a prompt you've wrapped across lines becomes two separate entries. And watch the divider character: any line containing ---- gets dropped entirely, so don't let a real prompt accidentally include one (a description with "4--star" would survive, but "----" spelled out would silently vanish). If you feed it a completely empty list, it returns an empty string rather than crashing - which is friendly, but also how you end up generating with a blank prompt if you paste nothing.

    It's a small node with a small job, and in a pack whose headline act is the XY-grid machinery, this is the quiet utility that makes prompt sweeps work. If you've ever hand-copied the same prompt thirty times into a queue, you'll appreciate it.

    Categoryscheduling

    Inputs (2)

    NameTypeDefaultDescription
    text_inputSTRING
    indexINT00–9999

    Outputs (1)

    NameTypeDescription
    STRINGSTRING