simple wildcard for ComfyUI
詳細
ファイルをダウンロード
モデル説明
ComfyUI-node-Lilly
インストール
./custom_nodes に移動し、Gitリポジトリをクローンしてください:
cd ./custom_nodes
git clone https://github.com/kuriot/ComfyUI_node_Lilly.git
または https://github.com/lilly1987/ComfyUI_node_Lilly/archive/refs/heads/main.zip をダウンロードし、以下のようにインストールします:
ワイルドカード
例 - ワイルドカード
形式:
a{b|{c|}|{d|e|}|f|}g____ my出力:
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 または 2 または 3
{2$$a|b|c} -> a,b または b,c または c,a または bb など
{9$$a|b|c} -> {3$$a|b|c} が自動で最大数を調整
{1-2$$a|b|c} -> 1~2のランダム選択
{-2$$a|b|c} -> {0-2$$a|b|c} 0-2
{1-$$a|b|c} -> {0-3$$a|b|c} 1-最大
{-$$a|b|c} -> {0-3$$a|b|c} 0-最大
例 - ワイルドカードテキストファイルの使用
- ~/a/b.txt
1
- ~/b.txt
2
- b は 1 または 2
- /b は 2
- /a/b は 1
- ?b は 2
- * は 1 または 2
ファイル名パターンマッチング
- * はすべての文字列にマッチ
- ? は任意の1文字にマッチ
- [seq] はseq内の任意の文字にマッチ
- [!seq] はseqに含まれない任意の文字にマッチ
- 参照 https://docs.python.org/3/library/fnmatch.html
サンプル実行
python wildcards.py
Pythonのサンプル
import wildcards as w
# 読み込むファイルのリスト。ワイルドカードファイルの取得
w.card_path = os.path.dirname(__file__) + "\\wildcards\\**\\*.txt"
# 実行
print(w.run("a{__b__|{c|}|{__d__|e|}|f|}g____ __my__"))
テキストファイル(異なるエンコーディングの.txtファイルをサポート)
元データ
# コメント
a,b
{b|c|__anotherfile__}
__anotherfile__
出力結果
a,b
b
c
__anotherfile__
カードの再読み込み
wildcards.card_load() を呼び出すか、[wildcards.run]("{9$$-$$a|b|c}", True) を使用
ComfyUI用
CLIPTextEncodeWildcards
- CLIPTextEncodeWildcards:シードなし
- CLIPTextEncodeWildcards:シードあり
SimpleSampler+modelVAE
- ワイルドカードを含む
SimpleSampler
- ワイルドカードを含む
SimpleSamplerVAE
- ワイルドカードを含む
VAELoaderText、LoraLoaderText、CheckpointLoaderSimpleText
- ファイル名のワイルドカード(?*)をサポート









