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 をダウンロードし、以下のようにインストールします:

2023-03-22 05 54 43

ワイルドカード

例 - ワイルドカード

  • 形式:
    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:シードあり

2023-03-20 02 13 50

SimpleSampler+modelVAE

  • ワイルドカードを含む

SimpleSampler+modelVAE

SimpleSampler

  • ワイルドカードを含む

SimpleSampler

SimpleSamplerVAE

  • ワイルドカードを含む

SimpleSamplerVAE

VAELoaderText、LoraLoaderText、CheckpointLoaderSimpleText

  • ファイル名のワイルドカード(?*)をサポート

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

このモデルで生成された画像

画像が見つかりません。