Nodes/EmberFrame Nodes/EmberFrame Wildcard Rule Builder
ComfyUI Node

EmberFrame Wildcard Rule Builder

Turns 'pick a camera angle' into one line of config

By emberframe·Created 3 months ago·Updated 3 months ago· 0
EmberFrame Wildcard Rule Builder
    • rule_line
    • rule_preview
    token_namecharacter
    wildcard_fileemberframe-nodes:example_camera_angles.txt
    modefixed
    start_line_number1
    repeat_each_line1

    EmberFrame Wildcard Rule Builder doesn't resolve anything itself. It writes a line of configuration text - and that line is the atom the rest of the EmberFrame wildcard pipeline runs on. Think of it as a little form that says "for token character, pull from this file, starting at line 1, moving forward each run." You feed the form, it prints the rule.

    That sounds trivial until you've hand-typed those rule strings in a text node and typo'd the mode for the third time. This node makes the format impossible to get wrong, because it constructs the string from dropdowns.

    How it works

    The output rule_line is always the same five-field pipe format:

    token_name | wildcard_file | mode | start_line_number | repeat_each_line
    

    The rule_preview output is the human-readable version of the same thing - a labeled breakdown of every field. Both outputs come from one build_rule call, so you wire rule_line into a Config Combiner and keep rule_preview on a text viewer for your own sanity.

    The inputs that matter

    • token_name - the placeholder name, default character. The Assembler looks for {character} in your prompt template. Call it anything; just make it match.
    • wildcard_file - dropdown of discovered wildcard .txt files.
    • mode - fixed (always the same line), next (advance each run), previous, or randomize.
    • start_line_number - 1-based line to start from (default 1).
    • repeat_each_line - how many runs to spend on each line before advancing (default 1).

    The defaults are sensible: fixed, line 1, repeat once. You mostly change token_name, the file, and mode.

    Outputs: rule_line (the config string) and rule_preview (the readable summary).

    Installing it

    Same pack as everything else here:

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

    Restart Comfy, or install "EmberFrame Nodes" via ComfyUI Manager. No dependencies, no downloads. It lives under EmberFrame/Prompt.

    Common issues

    • "No wildcard files were discovered" - the node throws this when its wildcards/ folder is missing or empty. Same root cause as the Sequential node: the folder didn't survive the install. Restore it and restart Comfy, because file discovery runs at node-creation time.
    • The dropdown only shows the three bundled examples until you drop your own .txt files into one of the scanned folders (custom_nodes/wildcards, ComfyUI/wildcards, or any sibling pack's wildcards/). That's a feature - drop a file, restart, done.
    • Mode names are aliased, not strict. The assembler accepts increment/decrement as synonyms for next/previous, but this node's dropdown only offers the four clean names, so stick with those.
    CategoryEmberFrame/Prompt

    Inputs (5)

    NameTypeDefaultDescription
    token_nameSTRINGcharacter
    wildcard_fileCOMBOemberframe-nodes:example_camera_angles.txt3 options: emberframe-nodes:example_camera_angles.txt, emberframe-nodes:example_lighting_styles.txt, emberframe-nodes:example_scene_moods.txt
    modeCOMBOfixed4 options: fixed, next, previous, randomize
    start_line_numberINT11–2147483647
    repeat_each_lineINT11–2147483647

    Outputs (2)

    NameTypeDescription
    rule_lineSTRING
    rule_previewSTRING