CivArchive
    simple wildcard for ComfyUI - 1.1
    Preview 283814

    ComfyUI-node-Lilly

    install

    Go to ./custom_nodes and clone git repo:

    cd ./custom_nodes
    git clone https://github.com/kuriot/ComfyUI_node_Lilly.git
    

    or https://github.com/lilly1987/ComfyUI_node_Lilly/archive/refs/heads/main.zip install this like

    2023-03-22 05 54 43

    wildcards

    ex - wildcard

    • form :
      a{b|{c|}|{d|e|}|f|}g____ my

    • to :
      aeg quality_my, breasts, { |character_dress|dress_my}, shoulder, {high heels,| } {choker,| } {lora:__lora_lst__:__rora_num__,| } NSFW, NSFW_my, { |style_my,}

    ex : {3$$a1|{b2|c3|}|d4|{-$$|f|g}|{-2$$h||i}|{1-$$j|k|}}/{$$l|m|}/{0$$n|}
    {1|2|3} -> 1 or 2 or 3
    {2$$a|b|c} -> a,b or b,c or c,a or bb or ....
    {9$$a|b|c} ->  {3$$a|b|c} auto fix max count
    {1-2$$a|b|c} -> 1~2 random choise
    {-2$$a|b|c} -> {0-2$$a|b|c}  0-2
    {1-$$a|b|c} -> {0-3$$a|b|c}  1-max
    {-$$a|b|c} -> {0-3$$a|b|c}  0-max
    

    ex - wildcard text file use

    • ~/a/b.txt

    1
    
    • ~/b.txt

    2
    
    • b to 1 or 2

    • /b to 2

    • /a/b to 1

    • ?b to 2

    • * to 1 or 2

    filename pattern matching

    run sample

    python wildcards.py
    

    python sample

    import wildcards as w
    
    # 가져올 파일 목록. get wildcards file
    w.card_path=os.path.dirname(__file__)+"\\wildcards\\**\\*.txt"
    
    # 실행 run
    print(w.run("a{__b__|{c|}|{__d__|e|}|f|}g____ __my__"))
    

    txt file (supports .txt files in different encodings.)

    from

    # 주석 comment
    a,b
    {b|c|__anotherfile__}
    __anotherfile__
    

    result

    a,b
    b
    c
    __anotherfile__
    

    reload card

    call wildcards.card_load() or wildcards.run("{9$$-$$a|b|c}",True)

    for ComfyUI

    CLIPTextEncodeWildcards

    • CLIPTextEncodeWildcards : no seed

    • CLIPTextEncodeWildcards : seed

    2023-03-20 02 13 50

    SimpleSampler+modelVAE

    • include wildcards

    SimpleSampler+modelVAE

    SimpleSampler

    • include wildcards

    SimpleSampler

    SimpleSamplerVAE

    • include wildcards

    SimpleSamplerVAE

    VAELoaderText , LoraLoaderText , CheckpointLoaderSimpleText

    • support file name Wildcard(?*)

    2023-04-13 23 07 29 2023-04-13 23 07 49

    random_sampler_node.py

    2023-03-18 20 53 37

    VAELoaderDecode.py

    2023-03-18 20 52 27

    Description

    bug fix

    FAQ

    Comments (3)

    vivianlynnMar 23, 2023· 1 reaction
    CivitAI

    Having some trouble with the wildcards, ComfyUI doesn't attempt to re-read the prompt across multiple generations, so it gets "stuck" on one entry in the wildcards list.

    ZolinMar 24, 2023

    Same here. It seems one has to make a minor change (e.g. append/remove a space) to put the node into a "dirty" state so it es re-evaluated instead of using the previous (cached) state.

    ZolinMar 24, 2023

    I provided a quick pull request on github that could fix this issue, unless there are better options to do this that I don't know of (just started working with ComfyUI yesterday): https://github.com/lilly1987/ComfyUI_node_Lilly/pull/3

    I'm currently playing with my modified version and at first glance it looks quite good. I added a seed to the node so that one can choose between "new seed every gen" which, if enabled, will result in a new random prompt being generated for every invocation plus prompts can be reproduced by using the same seed (stored in PNG metadata alongside the wildcard prompt) which should work unless the wildcard text files were modified.

    Other
    Other

    Details

    Downloads
    201
    Platform
    CivitAI
    Platform Status
    Available
    Created
    3/19/2023
    Updated
    5/13/2026
    Deleted
    -

    Files

    simpleWildcardFor_11.zip

    Mirrors

    CivitAI (1 mirrors)

    Available On (1 platform)

    Same model published on other platforms. May have additional downloads or version variants.