Nodes/EmberFrame Nodes/EmberFrame Sequential Wildcard Prompt
ComfyUI Node

EmberFrame Sequential Wildcard Prompt

The simplest honest wildcard node in the pack

By emberframe·Created 3 months ago·Updated 3 months ago· 0
EmberFrame Sequential Wildcard Prompt
    • prompt_out
    • selected_line
    • resolved_line_number
    • wildcard_path
    prompt
    wildcard_file<none>
    line_index0

    Wildcard nodes are everywhere in Comfy, and most of them are fiddly about it - random selection, nested chains, probability weights, three different syntaxes. EmberFrame Sequential Wildcard Prompt is the opposite. It loads one .txt file, picks one line, and swaps it into your prompt. That's it. If you want deterministic, sequence-driven prompt variation - every camera angle from a file, one per generation, in order - this is the node.

    It's also the node the rest of the EmberFrame wildcard family is built around, so understanding it makes the Rule Builder and Prompt Assembler click.

    How it works

    Point wildcard_file at a text file, type line_index, and the node reads the file, ignores blank lines and # comments, and selects line line_index (modulo the line count, so a huge index just wraps). The selected line lands wherever you put a placeholder in prompt: {wildcard}, {{wildcard}}, or the older __WILDCARD__ syntax all work. No placeholder in the prompt? The line gets appended comma-separated instead.

    File discovery is friendlier than most packs: it scans the pack's own wildcards/ folder plus the shared custom_nodes/wildcards and ComfyUI/wildcards roots, and every sibling custom node's wildcards/ folder. The bundled examples - example_camera_angles.txt, example_lighting_styles.txt, example_scene_moods.txt - appear with a stable emberframe-nodes: prefix even if you renamed the install folder.

    Inputs and outputs that matter

    • prompt - your template with a placeholder where the line goes.
    • wildcard_file - dropdown of every discovered .txt, or <none>.
    • line_index - the line to use. This has control_after_generate wired up, so you can drive it with a seed or counter for hands-off sequencing.

    Outputs: prompt_out (the finished string, straight into your CLIP/text encode node), selected_line, resolved_line_number, and wildcard_path (the absolute file it read, handy for debugging which file actually won).

    Installing it

    It ships in the EmberFrame Nodes pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/emberframe/emberframe-nodes.git
    

    Restart Comfy, or use ComfyUI Manager and search "EmberFrame Nodes". No pip dependencies, no models. The node shows up under EmberFrame/Prompt.

    Common issues

    • Empty wildcard dropdown. The README calls this one directly: the wildcards/ folder didn't come along with the install. If you copied only nodes.py, or Manager skipped a file, the dropdown has nothing to show. Confirm the folder exists inside emberframe-nodes/ and restart.
    • "Right line, wrong file" confusion. If you renamed the install directory, the bundled files keep the emberframe-nodes: label precisely so your workflows don't break - trust the label, not the folder name.
    • It's not random. Random variation is a different job; this node is for walking a list in order. If you want both, that's what the Prompt Assembler's randomize mode is for.
    CategoryEmberFrame/Prompt

    Inputs (3)

    NameTypeDefaultDescription
    promptSTRINGUse {wildcard}, {{wildcard}}, or __WILDCARD__ to place the selected line.
    wildcard_fileCOMBO<none>Wildcard .txt file to load. Blank lines and comments are ignored.
    line_indexINT00–18446744073709550000

    Outputs (4)

    NameTypeDescription
    prompt_outSTRING
    selected_lineSTRING
    resolved_line_numberINT
    wildcard_pathSTRING