Extensions/ComfyUI-Prompt-String-Selector
ComfyUI Extension

ComfyUI-Prompt-String-Selector

ComfyUI custom node set for efficient prompt management and visualization across categories like characters, art styles, clothing, and poses with dynamic control and integration. (Description by CC)

By itom0717·Created 6 months ago·Updated 6 months ago· 0
itom0717/ComfyUI-Prompt-String-Selector
Nodes25
On cloudLocal install
CategoryPrompt String Selector
Stars0
Updated6 months ago

Nodes (25)

Art Style

Your quality tag block should live on disk, not in your clipboard

Prompt String Selector
Background

Swap backgrounds like you're changing a costume

Prompt String Selector
Camera

Camera is the one prompt block you'll actually A/B test

Prompt String Selector
Character

Your character sheets, as dropdown items

Prompt String Selector
Clothing 1

This node ships empty — that's the point (spring wardrobe)

Prompt String Selector
Clothing 2

Summer outfits live here (if you make them)

Prompt String Selector
Clothing 3

Same trick, different folder

Prompt String Selector
Clothing 4

Winter wardrobe slot — and the real reason the pack has four of these

Prompt String Selector
Emotion

The smallest change that changes everything

Prompt String Selector
Extra 1

Where underused prompt blocks go to be useful

Prompt String Selector
Extra 2

Extra 2 is the slot you'll actually rename in your head

Prompt String Selector
Extra 3

Three extra slots in, and the pattern clicks

Prompt String Selector
Extra 4

Five catch-all nodes is plenty

Prompt String Selector
Extra 5

The spare slot, or your fifth prompt category

Prompt String Selector
ID Select

The memo pad that doubles as a prompt switcher

Prompt String Selector
Negative

Your negative prompt, filed and switchable — with a caveat

Prompt String Selector
Pose 1

The cheapest way to vary a character

Prompt String Selector
Pose 2

A second pose bank so you can mix and match

Prompt String Selector
Aggregator (10)

The glue node that turns the pack into a real workflow

Prompt String Selector
Aggregator (20)

The pack's final form, and a caution about scale

Prompt String Selector
Prompt Switch (10)

Swap between ten prompts with one number — no graph surgery

Prompt String Selector
Prompt Switch (20)

Twenty prompt slots — and when that's not overkill

Prompt String Selector
Prompt Switch (5)

The small prompt router that ends duplicate workflows

Prompt String Selector
Season

The Season node, or why this pack keeps prompts in text files

Prompt String Selector
Time

The Time node — a placeholder until you add your own files

Prompt String Selector
Readme

Prompt String Selector 説明書

1. 概要

Prompt String Selector は、ComfyUI でのプロンプト管理を効率化・視覚化するためのカスタムノードセットです。 大量のプロンプトを「キャラクター」「画風」「衣装」などのカテゴリごとにテキストファイルで管理し、それらを ID やスイッチによって動的に制御・統合することを目的としています。

2. インストールと構成

ComfyUIのcustom_nodes フォルダ内で以下のコマンドを実行してください。

git clone https://github.com/itom0717/ComfyUI-Prompt-String-Selector.git

ディレクトリ構成

ComfyUI-Prompt-String-Selector/
├── __init__.py             # ノードの登録・マッピング管理
├── core_lib.py             # 共通ロジック
├── config.json             # データパス設定(任意)
├── node_aggregator10.py    # プロンプト統合ノード(入力10)
├── node_aggregator20.py    # プロンプト統合ノード(入力20)
├── node_prompt_switch5.py  # IDによる分岐スイッチノード(入力5)
├── node_prompt_switch10.py # IDによる分岐スイッチノード(入力10)
├── node_prompt_switch20.py # IDによる分岐スイッチノード(入力20)
├── node_id_selector.py     # 数値入力・メモ用ノード
├── (その他各カテゴリの .py ファイル)
└── data/                   # プロンプトファイルを格納するフォルダ
     ├── negative/          # ネガティブプロンプト用
     ├── art_style/         # 画質スタイルプロンプト用
     ├── background/        # 背景プロンプト用
     ├── camera/            # カメラワークプロンプト用
     ├── character/         # キャラクタープロンプト用
     ├── clothing1/         # 衣装プロンプト用1(春)
     ├── clothing2/         # 衣装プロンプト用2(夏)
     ├── clothing3/         # 衣装プロンプト用3(秋)
     ├── clothing4/         # 衣装プロンプト用4(冬)
     ├── emotion/           # 表情プロンプト用
     ├── extra1/            # その他プロンプト用1
     ├── extra2/            # その他プロンプト用2
     ├── extra3/            # その他プロンプト用3
     ├── extra4/            # その他プロンプト用4
     ├── extra5/            # その他プロンプト用5
     ├── pose1/             # ポーズプロンプト用1
     ├── pose2/             # ポーズプロンプト用2
     ├── season/            # 季節プロンプト用
     └── time/              # 時間帯プロンプト用

3. config.json の設定 (オプション)

データフォルダを外部(OneDriveや別ドライブ等)に置きたい場合は、config.json を作成して絶対パスを指定してください。

{
    "data_path": "C:\\Users\\YourName\\OneDrive\\AI_Data\\data"
}
  • Windowsパスの \ は \\ と二重に記述してください。

3. データの作成ルール

各カテゴリのフォルダ内には、プロンプトを記述した .txt ファイルを1つ以上配置します。

  • ファイル一つ一つがプルダウンの選択項目となります。
  • ファイル名の拡張子を除いた部分がプルダウンの選択項目で表示されます。
  • ファイル名: 01_normal_eyes.txt のように、「2桁の数字 + アンダーバー」 で始めてください。
  • IDの認識: ファイル名の先頭の数字が、ノードから出力される id (INT) として処理されます。
  • コメント機能: ファイル内で // または /* ... */ を使用すると、その部分は出力から除外されます。

4. ノード一覧と機能

4-1. 各種セレクター系

各フォルダ内のテキストファイル一覧を選択し、ファイルの内容 (text) と番号 (id) を出力します。

| 対応ノード | カテゴリ | |:----|:---| | Art Style | 画質スタイル | | Character | キャラクター | | Emotion | 表情 | | Pose 1 | ポーズ1 | | Pose 2 | ポーズ2 | | Clothing 1 | 衣装プロンプト用1(春) | | Clothing 2 | 衣装プロンプト用2(夏) | | Clothing 3 | 衣装プロンプト用3(秋) | | Clothing 4 | 衣装プロンプト用4(冬) | | Season | 季節 | | Time | 時間帯 | | Background | 背景 | | Camera | カメラワーク | | Extra 1 | その他1 | | Extra 2 | その他2 | | Extra 3 | その他3 | | Extra 4 | その他4 | | Negative | ネガティブプロンプト |

  • custom_input: プルダウンでこれを選択すると、ノード内のテキストボックスに書いた内容が優先出力されます。

4-2. 数値選択

任意の数値を出力します。 | 対応ノード | |:----| | ID Select |

  • メモ欄はワークフロー内の自分用備忘録として機能します。

4-3. プロンプト選択

ID 入力に基づき、接続された text_01~ のいずれかの入力を切り替えて出力します。

| 対応ノード | 入力ノード数 | |:----|----:| | Prompt Switch (5) |5| | Prompt Switch (10) |10| | Prompt Switch (20) |20|

  • 未接続のピンが選択された場合は、空の文字列を出力します。

4-4. プロンプト連結

入力されたプロンプトを1つに連結して出力します。 | 対応ノード | 入力ノード数 | |:----|----:| | Aggregator (10) |10| | Aggregator (20) |10|

  • 未接続のピンは無視します。
  • 各プロンプトの間に自動でカンマが挿入されます。

Licence

  • MIT
    • see LICENSE.txt

Author

itom0717