Extensions/Danbooru Tag JP Assist
ComfyUI Extension

Danbooru Tag JP Assist

Japanese-assisted tag autocomplete for ComfyUI text areas. Supports Danbooru tags, bundled natural language tags, local CSV tag files, Japanese aliases, popup settings, and optional Danbooru CSV update from Hugging Face.

By ukr8b3g-cmyk·Created 4 months ago·Updated 8 days ago· 7
ukr8b3g-cmyk/Danbooru-Tag-JP-Assist
Nodes1
On cloudLocal install
CategoryDanbooru Tag JP Assist
Stars7
Updated8 days ago
Readme

Danbooru Tag JP Assist

What’s New — v0.5.1(2026-11-03)

タグ辞書tags_merged_dedup.csvを503,976行へ更新しました(従来447,638行から56,338行追加)。翻訳辞書merged_translations_dedup.csvはヘッダーを除き55,570件です。同じ2ファイルをNeo版とComfyUI JP Assist版に収録します。

追加のON/OFF設定はありません。タグCSVと翻訳CSVは別々に選択し、保存済みの選択・順序を維持してください。既にこの2ファイルを選択している場合は選び直す必要はありません。辞書を再読み込みし、必要に応じて作業保存後にブラウザーを再読み込みしてください。キャッシュが残る場合は利用者のタイミングで次回本体起動時に反映できます。更新処理は本体の再起動や設定変更を行いません。

Hugging Faceからの自動取得を追加・再有効化する変更ではありません。既存設定、ワークフロー、検索/挿入方法、他のCSVは維持します。UTF-8とCSV構文、両版の実際の辞書読込関数、公開ブロブと正本のバイト一致を確認しました。今回の新版辞書を使った稼働画面・OS IME・GPU生成は未検証です。

What’s New — v0.5.0(2026-10-30)

  • 500件の候補を維持して検索・描画を軽量化。検索データを再利用し、候補は画面付近だけを描画します。追加設定は不要です。
  • ComfyUI_testのChrome実画面で、500件目までのスクロール・スクロールバー操作・マウス/キー確定・フォーカス維持・Undo/Redo・連続入力・Escapeを確認しました。
  • 日本語Settingsと日英ヘルプ、タグ/翻訳CSVの優先順チェックリスト、初期OFFの「よく使う候補を優先する」を含みます。保存済みの設定と従来モードは保持します。
  • Hugging FaceからのCSV取得を廃止。danbooru_2025.csvはダウンロードしません。辞書を更新する場合はCSVを手動で配置します。

初回の辞書準備には時間がかかります。447,638件の辞書を使うCPU比較では、件数順のblue検索が約404ms→21ms、500件の隔離描画が約13.2ms→1.2msでした。実ComfyUIへの補助HTTP測定は初回約7秒、再利用時約35〜38msです。これらは入力から描画までの遅延を保証する数値ではありません。検証と更新方法

補完の軽量化(v0.5.0)

追加設定は不要です。500件の候補、CSV優先順、各並び順、日本語・別名検索、CSVごとの挿入方法、使用頻度優先を維持します。検索用の並び順・文字列データを辞書読み込み時にメモリーへ準備し、再検索時の走査・並べ替えを減らします。初回は辞書解析に加えてこの準備時間がかかり、辞書の再読み込みで作り直します。ディスク上の検索DBや追加ライブラリは不要です。

候補一覧は画面内とその周辺の行だけを描画します。最大500件すべてをホイール・スクロールバー・上下キーで選べます。タグ・日本語・出典などの表示、候補一覧の高さ変更、フォーカス・Undo、IMEと古い候補の保護は維持します。検索開始までの80ms待機と辞書更新確認も変更しません。Settingsやワークフローの移行操作はありません。

この変更は次回のComfyUI起動とブラウザー再読み込みで有効になります。自動の再起動・再読み込みは行いません。

Autocomplete performance (v0.5.0): No new settings. An in-memory dictionary index reuses rank orders, prefix matches and substring-search data; first-load preparation is additional work, and dictionary reload rebuilds it. Candidate rendering keeps only visible rows and a small surrounding window in the DOM while preserving all 500 choices, native scrolling, arrow navigation and popup resizing. CSV priority, sorting, Japanese/alias matching, insertion modes, personal usage ranking, focus, Undo and IME/stale-result guards remain unchanged. The 80 ms debounce and dictionary revision checks remain in place. No new dependencies, search DB files, settings migration or workflow fields. Activate on your next ComfyUI start and browser reload; this update does not restart or reload the app automatically.

CSV設定の整理と使用頻度(v0.5.0)

  • CSVファイル → 使用するタグCSV/使用する翻訳CSV(優先順):それぞれ別に選び、↑/↓で順序を変更します。「すべて選択」は現在の順序を保って残りを末尾に追加し、「選択解除」は空選択を保持します。選択したCSV以外には検索しません。新しいCSVを後で追加しても自動では選択しません。
  • 従来のCSV設定:以前の取得元・単一CSV指定・選択モードを折りたたみ欄へ移動しました。普段は開く必要がありません。保存済みの従来モードはそのまま動き、チェックリストには「使われていません」と表示します。「選択したCSVを使う」でチェックリストへ戻せます。タグと翻訳は独立して切り替えられ、従来の選択値も消しません。
  • 補完 → よく使う候補を優先する:初期OFF。ON中にEnter/Tab/クリックで確定した候補だけ、1回につき1を加算します。検索・カーソル移動・Escape・IME変換の確定だけでは加算しません。CSVの優先順を先に評価し、同じ優先グループ内では使用回数の多い候補を先に表示します。同回数なら既存の並び順を使います。表示上限より前に適用するため、通常は20件や500件に入らない候補も、使用回数が多ければ上位になります。
  • 日本語訳や別名から選んでも元の候補へ加算します。別CSV・別の辞書種別・分類体系・挿入モードの同名候補は別の履歴です。未選択のCSVを履歴から検索対象へ戻すことはありません。タグの投稿数は変更しません。
  • 履歴はブラウザーのローカルストレージ・ComfyUIの接続先ごとに保存します。同じブラウザープロファイルと接続先を使うComfyUIユーザー間では共有します。記録対象は直近に使った最大2,000候補の識別情報と確定回数で、プロンプト全文・検索語は保存しません。順位付けのため同じComfyUIサーバーに履歴を渡しますが、サーバーのCSVやワークフローには保存しません。保存できないブラウザーでは開いている画面内だけ記録を維持します。
  • 使用履歴を消去はこの履歴だけを消します。機能をOFFにすると記録・順位への反映を停止し、既存の履歴は残します。Undoは入力を戻しますが、確定操作の回数は減らしません。正/負プロンプトの回数は共通で、Forgeの履歴や減衰・対数補正設定は移行しません。
  • 候補を最大500件表示をONにすると、表示件数が20でも最大500件を表示します。20件に制限する場合はOFFにして表示件数を20にします。これは検索に一致した総件数を表示する設定ではありません。

日英の項目名・選択肢・マウスオーバー説明を用意し、日本語以外のUIは英語になります。Settings整理は次回のブラウザー再読み込みで反映されます。新しい使用頻度の順位付けは、更新したPythonコードを次回ComfyUI起動時に読み込んでから有効です。旧サーバーでは通常補完を維持し、Settingsに未反映の説明を表示します。更新作業では再起動しません。

Settingsの日本語表示とヘルプ(v0.5.0)

ComfyUIの言語(Locale)を日本語にすると、Settings → Danbooru Tag JP Assistの項目名・グループ名・選択肢・ヘルプが日本語になります。英語および日本語以外は英語で表示します。言語を切り替えると表示も更新し、CSVの選択・優先順・保存値は変更しません。各項目のヘルプ表示にマウスを重ねると説明が出ます。CSVのチェック欄・↑/↓・再読み込み・整形ボタンにも説明があります。

| 設定 | 使い方 | |---|---| | 検索する入力範囲 | 「単語」はスペースやカンマの後を検索。「タグ」はカンマ区切りのタグ全体を検索。 | | 候補の挿入方法:従来のタグ挿入(Existing) | すべての候補を従来のタグ挿入規則で扱い、カンマ・アンダースコアの設定に従います。 | | 候補の挿入方法:CSVごとの挿入方法(CSV-aware) | CSVのinsert_modeに従います。tag/phraseはカンマ設定、wordは空白のみ、rawは原文どおり。自然言語でカンマを付けたくない場合はwordを指定します。 | | タグ/翻訳CSVの選択方法 | 「選択したCSVのみ」でチェックしたファイルだけ使用し、↑/↓で優先順を変更。空の選択は候補なし/翻訳なしです。 | | 候補を最大500件表示 | ONは最大500件。OFFなら指定した「候補の表示件数」を使います。検索結果の総件数ではありません。 |

辞書更新方針:初回のタグ辞書はtags_merged_dedup.csvを選びます(保存済みの設定は維持)。danbooru_2025.csvは配布もダウンロードもしません。Hugging FaceからのCSV取得全体を廃止し、既存の更新ON設定や古い画面からの更新API呼び出しでもファイルを取得しません。新しい辞書は手動でCSVフォルダーへ置き、辞書を再読み込みで反映します。保存済みの選択リストには新CSVを自動追加しません。

反映方法:更新後、ワークフローを保存してブラウザーを再読み込みすると新しいSettingsを読み込みます。Python側の旧更新APIを無効化する変更は、次回のComfyUI再起動で有効になります。旧サーバーを再起動せずに使用している間は、旧APIの実装がメモリー上に残ります。通常の新UIはそのAPIを呼びません。

Forge Neo版との違い

両版で同じCSVを選んでも、以下の実装差があります。Forge側の設定をComfyUIへ自動移行する機能はありません。

| 項目 | ComfyUI JP Assist | Forge Neo TagComplete | |---|---|---| | 挿入モード | 従来のタグ挿入が初期値。CSV指定は明示選択 | CSVのメタデータと辞書種別を利用 | | 自然言語CSVのモード省略時 | natural_languageはwordとして扱う | 1語はword、複数語はphraseとして推定 | | 検索の正規化 | 小文字化・アンダースコアの空白化 | 加えてUnicode NFKC正規化などを使用 | | 検索範囲 | 初期値は単語単位。タグ全体にも切り替え可 | 自然言語の複数語句に対応する置換範囲処理あり | | 全件表示 | 1回の検索は最大500件。総ヒット数ヘッダーなし | 検索結果の総件数ヘッダーあり。表示上限はForge側設定に依存 | | CSVの配置 | CSV用フォルダー直下 | サブフォルダーも走査 | | LoRA・Embedding・ワイルドカード実行 | Forge専用機能は移植していません | Forge側の機能・設定を使用 |

自然言語の挿入規則を近づけるには、同じCSVにsource_typeとinsert_modeを明示し、ComfyUIでは「CSVごとの挿入方法」を選び、両版のCSV選択順とカンマ設定を合わせます。ただし複数語の置換範囲は別です。例えばsoft natからsoft natural lightingを選ぶと、ComfyUIの単語単位では前のsoftを保持してsoft soft natural lightingとなり、Neoは一致する接頭語句全体を置換します。これは今回のUI翻訳では変更していません。上表はソース比較結果です。実稼働する両アプリでの同時比較・日本語IMEの実入力テストは未実施です。

候補ボックスの高さ変更 / Resize suggestions

候補の下端をドラッグして高さを変更できます。文字の上側に表示される場合は上端を操作します。高さは保存され、Settings → Danbooru Tag JP Assist → Display → Suggestion popup height (px)でも変更できます(初期240px)。画面の空きスペースに合わせて一時的に縮めます。保存済みのCSV選択は維持し、新規タグ選択はtags_merged_dedup.csvのみです。

Drag the bottom edge to resize suggestions, or the top edge when the popup is above the caret. Height is saved and can also be changed in Settings → Danbooru Tag JP Assist → Display → Suggestion popup height (px), default 240px. Available viewport space limits the displayed height. Saved CSV choices are preserved; new tag selections use only tags_merged_dedup.csv.

Danbooru Tag JP Assist は、ComfyUI ノードの複数行テキスト入力欄でタグ候補を表示する補完ノードです。

日本語で検索しながら、英語タグや英語の自然言語ワードをプロンプトへ入力できます。

English README

スペース・カンマの後も補完するには:Completion unit の初期値は Word (after spaces) です。保存済みの Tag (comma separated) は自動変更しません。Settingsで Completion unit を検索して切り替えてください。Completion behavior / CSV-awareとは別の設定です。項目が見つからない場合はワークフローを保存し、Ctrl + F5 で画面を再読込してください。

What’s New — v0.4.2(2026-10-24)

  • 自然言語補完で句読点を保持:CSV-awareのword候補を確定しても、直後の句読点・閉じ括弧を削除しません。語中の置換、日本語別名、UTF-16位置、内部のハイフン・アポストロフィー、記号を含む候補にも対応します。既存のtag/raw/phrase挿入規則は維持します。
  • 自身のノードも一括Formatの対象:DanbooruTagJPAssistのtext欄を全対象・選択ノードの整形に含めます。Note/JSON/readonly/disabledとIME中の除外は維持します。
  • 空になる検索を安全に処理:_・__・空白などは空候補を返し、API例外を防ぎます。空文字による全件取得は維持します。
  • 公開前チェックの整合:必須のRegistry設定CIをmainの全pushで実行し、製品だけの修正でも正式公開前の検証を満たせるようにします。検証を免除する変更はありません。

辞書・保存済み設定・ワークフローは変更しません。検証と制約

What’s New — v0.4.1(2026-10-24)

  • 候補を入力中の文字・カーソルのすぐ下に表示するよう変更しました。プロンプト欄の下端まで視線を移す必要がなくなります。
  • 改行、日本語の折り返し、入力欄内のスクロール、ComfyUIの拡大率を位置計算に反映します。
  • 画面下端で候補が入り切らないときは文字の上側へ表示し、左右の画面端では位置を調整します。
  • 入力位置がスクロールで見えなくなったときは候補を隠します。既存の候補確定・IME・CSV設定は維持します。

What's New — v0.4.0(2026-10-24)

  • 自然言語辞書を整理し、MOSS向けの英語語句CSV moss_image_natural_language.csv と対応する日本語検索用CSV moss_image_natural_language_ja.csv を追加しました。
  • 使い方:Settings → Danbooru Tag JP Assistで、タグと翻訳の各チェックリストから上記CSVを選びます。追加ファイルは保存済みの選択に自動追加されません。CSV-awareでは通常のMOSS語句はphraseとしてカンマ設定に従い、raw指定のテンプレートはそのまま挿入します。
  • 新規設定のCSV選択モードはタグ・翻訳とも Selected CSVs only。未保存のチェックリストは利用可能なCSVで初期化し、保存済みのモード・選択・空選択を維持します。
  • 候補のスクロールバーを左クリックしても候補が閉じないよう修正。実際に入力欄からフォーカスが外れた場合は閉じます。
  • Formatのマウスオーバー説明は日本語UIで日本語、それ以外は英語。設定画面の画像と各項目の説明も掲載しました。

What's New — v0.3.0(2026-10-23)

  • 上部操作バーにFormatを追加:ボタンを押すだけでプロンプトの余分なカンマ・空白を整えます。入力欄では Alt + Shift + F でも実行できます。
  • 初期対象はAll recognized prompt inputs:現在のワークフロー内の認識できるプロンプト欄を一括整形。現在欄/選択文字列、選択ノードにも切り替えられます。保存済みの対象設定は維持します。
  • 設定は既存Settingsに集約:Danbooru Tag JP Assist → Formattingから、重複削除・アンダースコア変換・行末カンマ追加を個別にON/OFFできます。3つとも初期OFFです。詳しい手順はプロンプト整形を参照してください。
  • 特殊タグ・Undo・フォーカスを保護:重み、LoRA/Embedding、ワイルドカード等を維持し、整形後も続けて入力できます。Undo/Redoは入力欄ごとに利用できます。
  • 補完操作を改善:候補をマウスで確定した後も入力フォーカスを維持。Sort modeの初期値をPriority / countに変更し、保存済みの並び順は維持します。
  • 表示不具合を修正:新しいComfyUI操作バーでもFormatを表示。Settingsを閉じた後に残る重複・参照元消失の説明ポップアップを除去します。

ノードID、ワークフロー形式、CSV選択順は変更しません。入力中やQueue実行時に自動整形する機能ではありません。

配布

正式版は GitHub Releases から取得できます。Comfy Registryへの公開・審査状態はGitHub ActionsとRegistry側で確認してください。Git cloneからのインストールも利用できます。

  • Node ID: danbooru-tag-jp-assist
  • Publisher ID: ukr8b3g-cmyk
  • バージョン: 0.5.0
  • ComfyUI の Python 環境で動作します。server と aiohttp は ComfyUI 側の環境を使用するため、追加の pip 依存は宣言していません。
  • 配布には本体 Python、web/、下記の同梱タグ6件・翻訳3件のCSV、README、LICENSE、THIRD_PARTY_NOTICES を含めます。.comfyignore は実行時ダウンロード、取得メタデータ、一時ファイル、利用者が追加したデータを除外します。公開準備は利用者データのないクリーンな checkout で行ってください。
  • MIT はソースコードに適用され、第三者データの利用条件を置き換えません。THIRD_PARTY_NOTICES.md を参照してください。

インストール

ComfyUI を停止してから、custom_nodes に clone します。

cd D:\Codex\ComfyUI\custom_nodes
git clone https://github.com/ukr8b3g-cmyk/Danbooru-Tag-JP-Assist.git Danbooru-Tag-JP-Assist

すでにフォルダーがある場合は、通常は fast-forward のみで更新します。

cd D:\Codex\ComfyUI\custom_nodes\Danbooru-Tag-JP-Assist
git pull --ff-only

ローカルでコードを編集しておらず、ブランチが分岐して更新できない場合は、GitHub の origin/main を正本として同期できます。

git fetch origin
git reset --hard origin/main

git reset --hard origin/main はローカルの未コミット変更・ローカルのみのコミットを破棄します。必要な変更がある場合は先に退避してください。

その後、ComfyUI を再起動し、古いUIが残る場合はブラウザを Ctrl + F5 でハード更新してください。

v0.2.1 — 辞書更新の安全性とパフォーマンス改善(2026-10-19)

  • Hugging Faceからの取得は現在廃止されています。旧版のダウンロード保護処理も、ローカル辞書のみを使う仕組みに置き換えました。
  • 破損したCSVは候補から除外し、エラーと正常な候補を辞書選択ごとに保持します。同じファイル状態の繰り返し検索では正常なCSVを再解析せず、ファイル変更や「Reload dictionaries」で再試行します。保持する不完全選択のキャッシュは最大2件です。
  • Reload時のファイル読込ロック待ちはComfyUIのイベントループからワーカースレッドへ移しました。
  • 候補の色・表示項目のみの変更では検索キャッシュを消去せず、表示中の候補を再描画します。遅延DOM Widgetの検出はフレーム単位にまとめ、通常のノード生成時の検出は維持します。

ノードID、補完確定操作、CSV選択順と優先順位は変更していません。 v0.2.0で追加された機能を維持し、v0.2.1では保守修正のみを反映します。

できること

  • ComfyUI ノードの複数行テキスト欄でタグ候補を表示します。
  • 日本語の別名や翻訳から英語タグを検索できます。
  • 英語タグをプロンプトへ挿入します。
  • _ を空白に置き換えて、Krea系の自然言語プロンプト風に入力できます。
  • カンマを自動で追加できます。
  • 一致順、優先度/count順、A-Z順で並び替えできます。
  • Danbooruタグ、自然言語辞書、自分のCSVを併用できます。
  • 個別の Tag file (priority) を選ぶと、そのCSVの一致候補を最優先し、足りない分だけ Tag source で有効な他ファイルから補完します。
  • 候補挿入時に既存の改行・空行・インデント・前後スペースを保持できます。
  • 辞書はローカルCSVのみを使用します。起動時・辞書再読み込み時にHugging Faceへの確認やダウンロードは行いません。
  • 検索はサーバー側で行い、必要な候補だけをブラウザへ返します。
  • 入力検索は80msデバウンスされ、候補の上下移動ではリスト全体を再描画しません。

従来モードのAllは複数のタグファイルや翻訳ファイルをまとめて使います。従来モードでタグCSVを個別指定した場合は「そのファイルだけ」に限定せず、選択ファイルを優先しつつ他の有効なソースをフォールバックとして利用します。

ネットワーク接続は不要です。既存のローカルCSVをそのまま使用します。

基本的な使い方

  1. ComfyUI の Settings を開きます。
  2. Danbooru Tag JP Assist を有効にします。
  3. タグ・翻訳の Selection mode は初期値の Selected CSVs only を使い、それぞれのチェックリストで使うCSVを選びます。
  4. Autocomplete → Completion unit を確認します。初期値の Word (after spaces) なら、スペース・カンマの後に入力する1文字から補完できます。従来のカンマ区切りだけで使う場合は Tag (comma separated) を選びます。保存済みの選択は維持します。
  5. ノードの複数行プロンプト欄に英語または日本語を入力します。例えば test a と test, a は、どちらも a だけで候補を検索します。
  6. 候補をキーボードまたはマウスで選択します。appleを確定すると test apple/test, apple となり、前の確定済み部分は保持します。確定後のカンマ追加は既存の設定・CSV挿入形式に従います。

初期設定ではタグ・翻訳とも Selected CSVs only です。タグの初期選択は tags_merged_dedup.csv のみです。このCSVがない場合は利用可能なCSVを選択する従来動作に戻ります。翻訳の未保存チェックリストは利用可能なCSVで初期化します。保存済みのモード・選択・空選択は維持します。追加の辞書はSettingsのチェックリストで選択してください。

従来の All / single priority / All / single file モードでは以下の動作になります。

  • Tag file (priority): All は tags/tag_files/ 内の同梱CSVと、ローカルにある Danbooru CSV をまとめて検索します。
  • 個別の Tag file (priority) を選ぶと、そのファイルの一致候補が先に並び、候補上限に余りがある場合は Tag source で有効な他ファイルから補完します。
  • Translation file: All は同梱の翻訳CSVをまとめて読みます。
  • 従来モードの「両方のローカルCSV」は、保存済みのdanbooru_tags.csvとその他のローカルCSVを併用します。ダウンロードはしません。
  • 同じタグが選択中の優先ファイルと他ファイルの両方にある場合は、優先ファイル側の行を採用します。優先ファイルを指定していない All では、従来どおり後から読み込まれる Danbooru CSV 側が重複時に優先されます。
  • natural_language_tags.csv は軽量な英語辞書・プロンプト語彙です。Danbooruタグの代替ではありません。
  • merged_translations_dedup.csv は Danbooru タグ用の日本語別名です。
  • natural_language_ja.csv は自然言語辞書用の日本語別名です。
  • CSVはサーバー側でキャッシュされます。大きな All 構成では最初の検索だけ読み込みに時間がかかる場合があります。

プロンプト整形

JP AssistのFormatting設定画面

画像は3つのオプションをすべてON、対象をAll recognized prompt inputsにした使用例です。3つのスイッチの初期値はすべてOFFです。青がON、灰色がOFFで、切り替えただけでは整形されません。

画像の設定では、Formatを押すと認識できるプロンプト欄をまとめて整え、blue_hairをblue hairに変換し、同じ行の通常タグの重複を取り除き、後続の文章がある行の末尾にカンマを補います。各項目の意味と対象範囲は下の表を参照してください。

通常画面の上部操作バーにある Format ボタン、または入力欄で Alt + Shift + F を押すと整形します。設定は Settings → Danbooru Tag JP Assist → Formatting にまとめています。この中にもFormatボタンがあります。

初期状態では、上部のFormatボタンを押すと、現在のワークフロー内の認識できるプロンプト欄をまとめて整形します。1つの欄だけを整える場合は、Settingsで対象をCurrent input / selectionに変更し、入力欄をクリックしてからFormatを押してください。文字列の一部なら範囲選択して実行します。Settingsを毎回開く必要はありません。スイッチを切り替えただけでは文章は変わりません。

| 設定 | 実行時の動作 | | --- | --- | | Append comma on newline | 次の行にも文章があるとき、前の行末にカンマを追加。最後の行には追加しません。 | | Replace underscores | blue_hair → blue hair。特殊タグと除外パターンは維持。 | | Remove duplicate plain tags | 同じ行の smile, smile → smile。別の行や重み付きタグは削除しません。 | | Format target: Current input / selection | 最後にクリックした入力欄、またはその選択文字列だけを整形。 | | Format target: Selected nodes | 選択ノード内の対応するプロンプト欄を一括整形。 | | Format target: All recognized prompt inputs | 初期値。現在のワークフロー内の、認識できるプロンプト欄を一括整形。 |

3つのスイッチがすべてOFFでも、1girl,, solo , smile → 1girl, solo, smile のように余分なカンマ・空白を整えます。戻すときは対象の入力欄で Ctrl + Z を押します。

  • Format target:現在の入力欄/選択文字列、選択ノード、認識できる全プロンプト欄(初期値)を選べます。保存済みの選択は維持します。以前の初期値を保存している場合は、一度All recognized prompt inputsを選んでください。一括対象は既知のTextEncode・Prompt・String等の入力欄で、Note・JSON・コード欄は除外します。未対応のノードは現在の入力欄を指定してください。
  • 通常はカンマの連続・前後の空白を整え、改行・空行・インデントを維持します。
  • Remove duplicate plain tags、Replace underscores、Append comma on newline は個別に有効化できます。すべて初期OFFです。重複削除は同じ行の通常タグだけに適用します。行末カンマは後続行がある場合に追加し、BREAK等の制御行や文末の句読点は保護します。
  • 重み・括弧内、LoRA/Embedding、ワイルドカード、@artist、エスケープ、引用文字列を保護します。score_*と既存のUnderscore exclusionsも変換しません。JSONや閉じていない構文は整形しません。特殊タグの途中だけを選択した場合も変更しません。
  • 編集フォーカスを維持し、ブラウザーのUndo/Redoが利用できます。一括整形のUndoは入力欄ごとです。IME変換中は整形せず、実行後の文字列は通常の入力イベントでノードへ反映します。入力中・Queue実行時の自動整形は行いません。

操作構成は Haoming02/comfyui-prompt-format を参考にし、整形処理はJP Assistの特殊タグ保護に合わせて実装しています。

Underscore exclusionsの使い方

Settings → Danbooru Tag JP Assist → Insert → Underscore exclusions は、空白に変換したくないタグを指定する欄です。例えば score_*, rating_*, my_custom_tag とカンマ区切りで入力すると、該当するタグはアンダースコアを維持します。*は任意の文字列、?は任意の1文字に一致し、通常のタグ名は完全一致で指定できます。改行区切りにも対応しています。

補完のUse spaces for underscores、整形のReplace underscoresがONのときに適用します。どちらもOFFなら変換しません。追加の除外が不要なら空欄で構いません。Formatではscore_*と特殊構文を空欄でも保護します。

ファイル構成

タグファイルと翻訳ファイルは別フォルダーに置きます。

  • tags/tag_files/: 英語タグ・英語辞書CSVを置くフォルダー
  • tags/translation_files/: 日本語翻訳・別名CSVを置くフォルダー

現在の同梱タグファイル:

  • tags/tag_files/anima_artists.csv
  • tags/tag_files/anima_characters.csv
  • tags/tag_files/tags_merged_dedup.csv
  • tags/tag_files/e621.csv
  • tags/tag_files/moss_image_natural_language.csv: MOSS向け自然言語語句 / natural-language phrases
  • tags/tag_files/natural_language_tags.csv: 軽量な英語辞書・プロンプト語彙

同梱翻訳ファイル:

  • tags/translation_files/moss_image_natural_language_ja.csv: MOSS語句の日本語訳 / Japanese translations
  • tags/translation_files/natural_language_ja.csv: 自然言語辞書の一部に対応した日本語別名
  • tags/translation_files/merged_translations_dedup.csv: Danbooruタグ用の日本語別名

同梱しないファイル:

  • tags/tag_files/danbooru_tags.csv: 既存ファイルがあれば使用できます。自動取得はしません。

CSV形式

Settings → Danbooru Tag JP Assist → Autocomplete → Completion unit の初期値は Word (after spaces) です。スペース・カンマの後の単語を1文字から検索し、その単語だけを置換します。前の確定済み単語・後続の文章は保持します。保存済みの Tag (comma separated) は従来の動作を維持します。Completion behavior とカンマ追加の設定、CSV固有のword/raw挿入規則は維持します。

ヘッダー付きCSVに加え、ヘッダーなしの tag,category,count,aliases 形式も読み込めます。ヘッダーなしの4列目は別名として扱う位置で、挿入モードには使いません。不正なCSVはファイル単位で除外し、正常な辞書と通常入力を継続します。

Settings → Danbooru Tag JP Assist 内の Completion behavior は初期値 Existing です。CSV-aware を選ぶと、CSVの任意列 source_type (tag / natural_language / custom)、insert_mode (tag / phrase / word / raw)、category_scheme を利用します。tag と phrase は既存のカンマ設定、word は空白のみ、raw はセルの文字列を変換せず挿入します。自然言語の word は複数語にも使えます。列のない利用者CSVは従来動作を維持し、同梱 natural_language_tags.csv はCSV-aware時に natural_language / word として扱います。

日本語表示と Use JP aliases for search は独立しています。Show TAG / NL / CUSTOM、Show source CSV、Show post count は初期OFFです。投稿数は確認できる辞書由来の値だけを表示し、0件と不明を区別します。同名タグの優先CSV・Allでの採用順は維持し、別の辞書の投稿数やカテゴリを混ぜません。

Underscore exclusions は score_* などのglobパターンをカンマまたは改行で指定できます。挿入文字列だけを保護し、ワイルドカードの実行はしません。Reload dictionaries はサーバーとブラウザーの検索キャッシュを無効化します。CSVの追加・削除後にファイル選択肢も更新する場合はブラウザーを再読込してください。

IME変換中の確定キーは補完で消費しません。Escape、選択位置変更、設定変更、ノード削除で古い候補を無効化し、補完確定前にも入力と位置を確認します。通常のChromiumではネイティブ編集を使ってUndo履歴を保持します。他ブラウザーの代替編集経路はUndo対応を保証しません。

タグファイル:

tag,category,count
1girl,0,4974288
long_hair,0,3608339
  • tag: プロンプトへ挿入される英語タグ
  • category: Danbooru互換のカテゴリ番号
  • count: 優先度や人気順ソートに使う数値

翻訳ファイル:

tag,ja,aliases
1girl,"少女,女の子,おんなのこ","少女,女の子,若い女性,girl"
long_hair,"長髪,ロングヘア","長髪,ロングヘア,髪が長い"
  • tag: 対応する英語タグ
  • ja: 日本語表示用テキスト
  • aliases: 検索用の日本語別名。複数ある場合はカンマ区切り

Tag file (priority) の動作

個別CSVを選んでも検索範囲はその1ファイルだけにはなりません。選択CSVの一致候補に優先度0、フォールバック候補に優先度1を付け、Sort mode の並び順より先に優先度を評価します。

たとえば Suggestion count = 20 で、選択CSVに検索語と一致する候補が7件しかない場合、先頭7件は選択CSVから出し、残り最大13件を Tag source で有効な他CSVから補完します。選択CSVだけで20件以上一致すれば、表示上は選択CSVの候補だけになります。

主な設定

タグ・翻訳の各 Selection mode の初期値は Selected CSVs only です。チェックしたCSVだけを選択順に使用します。↑ / ↓ で優先順位を変更できます。空の選択は候補・翻訳なしです。旧 Tag source / Tag file (priority) / Translation file は「従来のCSV設定」に保持しますが、選択モードでは対応する旧設定を使用しません。

  • Tag file (priority): tags/tag_files/ 内の1ファイル、または All。初期値は All です。個別ファイルを選ぶと、そのファイルの一致候補を優先し、候補が足りない場合は Tag source で有効な他ファイルから補完します。
  • Translation file: tags/translation_files/ 内の1ファイル、または All。
  • Hugging Face更新スイッチは廃止しました。古いAutoUpdateHfがONでも無視し、旧更新APIもダウンロードを実行しません。
  • 候補を最大500件表示: ONでは表示件数の指定を使わず、最大500件を表示します。
  • 候補の表示件数: 最大500件表示がOFFのときの上限です。検索結果の総件数ではありません。
  • Sort mode: Match first、Priority / count、Tag A-Z。
  • Popup color: 候補ポップアップの色です。
  • Use spaces for underscores: long_hair を long hair として挿入します。
  • Append comma: 候補挿入後にカンマを追加します。
  • Preserve prompt formatting: 初期値はONです。候補挿入時に既存の改行・空行・インデント・前後スペースを保持します。OFFでは従来の自動整形動作になります。

入力検索は80msデバウンスされ、候補の上下移動ではリスト全体を再描画しません。辞書はローカルCSVだけを読み込みます。

CSVを追加・削除したら、Settingsの「辞書を再読み込み」を押してください。保存済みの選択には新ファイルを自動追加しません。

注意

  • Settings → pysssss → Text Autocomplete と併用すると、Embeddingなどの別候補が重なったり、スクロールバー操作でJP Assist候補が閉じる場合があります。その場合はpysssss側のText AutocompleteをOFFにしてください。JP AssistはEmbedding / LoRA候補を自動取得しません。

  • 補完対象は ComfyUI ノードに属する複数行テキスト欄です。Settings や一般的なモーダル内の textarea には取り付けません。

  • GitHubリポジトリには danbooru_tags.csv を含めません。

  • ダウンロード済みの danbooru_tags.csv は、元のファイル名と内容を維持します。

  • 自分のタグファイルは tags/tag_files/ に置いてください。

  • 自分の翻訳・別名ファイルは tags/translation_files/ に置いてください。

  • All で大きなCSVを複数読む場合、初回検索時は単一CSVより読み込みに時間がかかる場合があります。

  • タグファイルがない場合、候補ポップアップは表示されません。

ライセンス

ソースコードは MIT License で公開しています。

同梱するタグ・翻訳データには、改変した第三者データが含まれる場合があります。出典と利用条件は THIRD_PARTY_NOTICES.md を参照してください。


English README

Danbooru Tag JP Assist adds tag suggestions to multiline text areas that belong to ComfyUI nodes.

It is intended for users who want to search English Danbooru tags and English prompt vocabulary with optional Japanese aliases.

Completion after spaces and commas: Completion unit defaults to Word (after spaces). A saved Tag (comma separated) choice is preserved; search Settings for Completion unit to change it. This is separate from Completion behavior / CSV-aware. If the option is missing, save your workflow and hard-refresh with Ctrl + F5.

What’s New — v0.5.1 (2026-11-03)

Updated tags_merged_dedup.csv to 503,976 rows, adding 56,338 to the previous 447,638. merged_translations_dedup.csv contains 55,570 data rows excluding its header. Both Neo and ComfyUI JP Assist ship the same two dictionary files.

No new switch. Select tag and translation files separately and retain saved selections/order. Existing selections of these filenames need no change. Reload dictionaries and, when needed, save work before reloading the browser; remaining runtime caches can refresh on your next planned application start. This update does not restart the app or change settings. It does not add or re-enable Hugging Face automatic downloads. Saved settings, workflows, search/insertion behavior and other CSVs are preserved.

Validated UTF-8/CSV syntax, both implementations' actual dictionary readers and exact source/public blob bytes. Live UI, native OS IME and GPU generation with the new dictionaries were not retested.

What’s New — v0.5.0 (2026-10-30)

  • Reuse dictionary search data and render only nearby candidate rows while retaining all 500 choices. No new performance setting is needed.
  • Verified scrolling to candidate 500, scrollbar dragging, mouse/keyboard completion, focus, Undo/Redo, continuous typing and Escape in the running ComfyUI_test Chrome UI.
  • Includes localized Settings/help, ordered tag/translation CSV checklists and opt-in personal usage ranking. Preserve saved settings and legacy CSV modes.
  • Remove Hugging Face CSV downloads, including danbooru_2025.csv; place updated dictionaries in the CSV folders manually.

Initial dictionary preparation still takes time. CPU and isolated-render benchmarks are separate from live input latency; see validation and upgrade notes. Save your work and activate the update on your next planned ComfyUI start and browser reload. This update does not restart the app automatically.

What’s New — v0.4.2 (2026-10-24)

  • Preserve punctuation, closing delimiters and adjacent Unicode symbols when completing CSV-aware words; retain legacy tag/raw/phrase behavior.
  • Include this extension's public text node in all/selected Format targets while preserving exclusions and IME guards.
  • Return empty suggestions for underscore/whitespace-only searches without changing empty-query full-list requests.
  • Run required Registry configuration checks on every main push so product-only releases can satisfy the existing source-CI gate.

Dictionaries, saved settings and workflows remain unchanged. See release notes for validation and limits.

What’s New — v0.4.1 (2026-10-24)

  • Show autocomplete suggestions directly below the current text caret instead of the bottom of the prompt box.
  • Account for newlines, Japanese text wrapping, textarea scrolling, and ComfyUI canvas scaling.
  • Place suggestions above the text near the bottom of the viewport, and keep the popup within horizontal viewport edges.
  • Hide suggestions when the caret scrolls out of view. Existing completion, IME, and CSV preferences are preserved.

What's New — v0.4.0 (2026-10-24)

  • Reorganize natural-language vocabulary and add moss_image_natural_language.csv with matching Japanese search translations in moss_image_natural_language_ja.csv.
  • Select these files independently in the tag and translation checklists under Settings → Danbooru Tag JP Assist. New files are not added to saved selections automatically. In CSV-aware mode, Ordinary MOSS phrases follow the comma preference; raw templates are inserted unchanged.
  • New tag and translation selection modes default to Selected CSVs only; unsaved lists start with available CSVs. Saved modes, order, and empty selections are preserved.
  • Keep suggestions open while dragging their scrollbar, while dismissing them on genuine input focus loss.
  • Format hover help follows the ComfyUI language: Japanese for Japanese UI, English otherwise. The README includes a Settings screenshot and usage explanations.

What's New — v0.3.0 (2026-10-23)

  • Format in the top action bar, also available through Alt + Shift + F. Format all recognized prompt inputs by default, or choose the current input/selection or selected nodes.
  • Options in the existing Settings category: duplicate plain tags, underscore conversion and newline commas, all off by default. See Prompt Formatting for usage.
  • Preserve special syntax, focus and per-input Undo/Redo. No automatic formatting on typing or queue submission.
  • Better completion behavior: keep focus after clicking a candidate and default sorting to Priority / count. Saved preferences take precedence.
  • UI fixes: support delayed/replaced modern toolbars and remove orphaned or duplicate Settings tooltips.

Existing workflow formats, node IDs and CSV precedence are preserved.

Distribution

Stable versions are available from GitHub Releases. Check GitHub Actions and Comfy Registry for publication and review status. Git clone installation is also supported.

  • Node ID: danbooru-tag-jp-assist
  • Publisher ID: ukr8b3g-cmyk
  • Version: 0.5.0
  • Runs inside ComfyUI's Python environment. ComfyUI supplies server and aiohttp, so no additional pip dependencies are declared.
  • The distribution includes the Python implementation, web/, the six bundled tag CSVs and three translation CSVs listed below, README, LICENSE, and THIRD_PARTY_NOTICES. .comfyignore excludes runtime downloads, download metadata, temporary files, and user-added data. Prepare any publication from a clean checkout without user data.
  • MIT applies to the source code and does not replace third-party data terms. See THIRD_PARTY_NOTICES.md.

Installation

Stop ComfyUI, then install into custom_nodes:

cd D:\Codex\ComfyUI\custom_nodes
git clone https://github.com/ukr8b3g-cmyk/Danbooru-Tag-JP-Assist.git Danbooru-Tag-JP-Assist

If the folder already exists, normally update with fast-forward only:

cd D:\Codex\ComfyUI\custom_nodes\Danbooru-Tag-JP-Assist
git pull --ff-only

If you do not keep local code changes and the local branch has diverged, you can sync it exactly to GitHub origin/main:

git fetch origin
git reset --hard origin/main

git reset --hard origin/main discards uncommitted changes and local-only commits. Back up anything you need first.

Restart ComfyUI and hard refresh the browser with Ctrl + F5.

What It Does

  • Shows suggestions while typing in multiline text boxes that belong to ComfyUI nodes.
  • Inserts English tags into the prompt.
  • Can display Japanese aliases next to suggestions.
  • Can insert spaces instead of underscores for Krea-style natural prompts.
  • Supports sorting by match, priority/count, or tag name.
  • Uses local CSV dictionaries only, including previously saved dictionaries.
  • Selecting a specific Tag file (priority) prioritizes matches from that CSV and fills any remaining slots from other sources enabled by Tag source.
  • Can preserve existing line breaks, blank lines, indentation, and surrounding spaces when inserting a suggestion.
  • Never checks or downloads a CSV from Hugging Face at startup or when reloading dictionaries.
  • Performs matching on the server and sends only the requested suggestions to the browser.
  • Debounces input searches by 80 ms and updates keyboard selection without rebuilding the full suggestion list.

All is the simplest combined mode. Selecting a specific file no longer acts as a hard single-file filter: the selected file is treated as the priority source and other enabled sources remain available as fallback.

No network connection is required. Existing local CSV files remain usable.

Basic Use

  1. Open ComfyUI Settings.
  2. Enable Danbooru Tag JP Assist.
  3. Keep both selection modes at the default Selected CSVs only and choose files in the tag and translation checklists.
  4. Check Autocomplete → Completion unit. The default Word (after spaces) completes from one letter after a space or comma. Choose Tag (comma separated) for the previous comma-only behavior. Saved choices are preserved.
  5. Type English or Japanese text in a multiline prompt box. Both test a and test, a search only a.
  6. Select a suggestion with the keyboard or mouse. Choosing apple produces test apple or test, apple, preserving confirmed text. Any appended comma follows existing preferences and CSV insertion modes.

Both selection modes default to Selected CSVs only. The initial tag selection is only tags_merged_dedup.csv; when it is unavailable, the previous available-file defaults apply. Unsaved translation lists start with available translation CSVs. Saved modes, selections and empty selections are preserved. Select additional dictionaries in the Settings checklists.

Behavior in the legacy All / single priority / All / single file modes:

  • Tag file (priority): All searches bundled CSV files under tags/tag_files/ plus the local Danbooru CSV when available.
  • Selecting a specific Tag file (priority) puts matches from that file first, then fills unused result slots from other files enabled by Tag source.
  • Translation file: All loads the bundled translation CSV files together.
  • In legacy mode, Both local sources uses a saved danbooru_tags.csv plus other local CSVs; it does not download anything.
  • If a tag exists in both the selected priority file and fallback files, the selected file wins. With All and no explicit priority file, the later-loaded Danbooru CSV keeps the existing duplicate-resolution behavior.
  • natural_language_tags.csv is a lightweight English dictionary and prompt vocabulary, not a Danbooru tag replacement.
  • merged_translations_dedup.csv is for Danbooru tag Japanese aliases.
  • natural_language_ja.csv is only for the natural language dictionary.
  • CSV data is cached on the server. A large All configuration may take longer on the first search while the cache is built.

Tag Files

Use two separate folders:

  • tags/tag_files/: English tag files.
  • tags/translation_files/: Japanese translation or alias files.

Currently bundled tag files:

  • tags/tag_files/anima_artists.csv
  • tags/tag_files/anima_characters.csv
  • tags/tag_files/tags_merged_dedup.csv
  • tags/tag_files/e621.csv
  • tags/tag_files/moss_image_natural_language.csv: MOSS向け自然言語語句 / natural-language phrases
  • tags/tag_files/natural_language_tags.csv: lightweight English dictionary and prompt vocabulary

Bundled translation files:

  • tags/translation_files/moss_image_natural_language_ja.csv: MOSS語句の日本語訳 / Japanese translations
  • tags/translation_files/natural_language_ja.csv: Japanese aliases for part of the natural language dictionary.
  • tags/translation_files/merged_translations_dedup.csv: Japanese aliases for Danbooru tags.

Not bundled:

  • tags/tag_files/danbooru_tags.csv: existing local files remain usable; never downloaded automatically.

CSV Format

Settings → Danbooru Tag JP Assist → Autocomplete → Completion unit defaults to Word (after spaces): search from one letter after a space or comma and replace only that word. Confirmed words and following text are preserved. A saved Tag (comma separated) choice retains the previous behavior. Completion behavior, comma preferences and CSV word/raw insertion rules still apply.

Headerless tag,category,count,aliases files are supported; the fourth column is not an insertion mode. Malformed files are isolated from healthy dictionaries.

All controls remain in Settings → Danbooru Tag JP Assist. Completion behavior defaults to Existing. Opt into CSV-aware to use optional source_type, insert_mode, and category_scheme columns. tag / phrase follow the comma preference, word inserts without a comma (including multi-word phrases), and raw preserves the decoded cell text. User CSVs without these columns retain tag behavior; the bundled natural-language dictionary uses word behavior in CSV-aware mode.

Japanese search and display are independent. Source labels, source filenames and post counts default to hidden. Zero and unknown counts are distinct, and metadata belongs to the winning CSV row. Underscore exclusions accept comma/newline-separated glob patterns. Reload dictionaries clears both server and browser search caches and refreshes the ordered CSV checklists; reload the browser to refresh the legacy single-file dropdown options after adding/removing CSVs. Active IME composition, stale input, Escape and node removal cannot commit obsolete suggestions. Chromium uses native edits for undo; fallback editing on other browsers may not preserve native undo history.

Developer checks (no additional dependencies):

python -B tests/test_backend.py
node --test tests/test_completion_core.mjs tests/test_autocomplete.mjs

Tag file:

tag,category,count
1girl,0,4974288
long_hair,0,3608339

Translation file:

tag,ja,aliases
1girl,"少女,女の子,おんなのこ","少女,女の子,若い女性,girl"
long_hair,"長髪,ロングヘア","長髪,ロングヘア,髪が長い"

Tag file (priority) behavior

Selecting a specific CSV does not restrict search to that file alone. Matches from the selected CSV are assigned priority 0 and fallback matches priority 1, and this priority is evaluated before the selected Sort mode.

For example, with Suggestion count = 20, if the selected CSV has only 7 matches for the query, those 7 appear first and up to 13 additional matches are filled from other sources enabled by Tag source. If the selected CSV has 20 or more matches, only its matches will normally be visible within that result limit.

Settings

  • Tag selection mode and Translation selection mode: both default to Selected CSVs only. Saved modes are preserved. The legacy All / single priority (All / single file for translations) modes remain available.
  • Selected tag CSVs (ordered) and Selected translation CSVs (ordered): check files in priority order, then use ↑ / ↓ to reorder. In selected mode only checked files are read. The first selected tag CSV wins duplicate rows and its matches precede later files before Sort mode; the first selected translation CSV wins duplicate translations. Empty tag selection gives no suggestions; empty translation selection gives no translations. Missing selections remain visible as unavailable and never fall back to All.
  • In selected mode the tag checklist controls search instead of Tag source and Tag file (priority), and the translation checklist controls search instead of Translation file. The legacy controls are grouped in the collapsed Legacy CSV settings section; they are disabled in the corresponding selected mode. Switching back restores those existing choices. Settings are global and do not add workflow fields. Restart ComfyUI and reload the browser after updating to enable the new backend behavior.
  • Tag file (priority): one file in tags/tag_files/ or All. The default is All. Selecting a file prioritizes matches from that file, then fills remaining suggestions from other files enabled by Tag source.
  • Translation file: one file in tags/translation_files/ or All.
  • The Hugging Face update switch has been removed. A saved AutoUpdateHf=true is ignored; old update API calls cannot download anything.
  • Show up to 500 candidates: ON displays up to 500 matches; OFF uses the configured candidate limit (1–200). This is not a total-hit count.
  • Candidate limit (when expanded list is off): limits suggestions when Show up to 500 candidates is off.
  • Sort mode: Match first, Priority / count, or Tag A-Z.
  • Popup color: changes the suggestion popup color.
  • Use spaces for underscores: inserts long hair instead of long_hair.
  • Append comma: adds a comma after inserted suggestions.
  • Preserve prompt formatting: enabled by default. Keeps existing line breaks, blank lines, indentation, and surrounding spaces when inserting a suggestion. Disable it to use the legacy whitespace-normalizing behavior.

Autocomplete searches are debounced by 80 ms. Keyboard navigation does not rebuild the candidate list. Dictionaries are read from local CSVs only.

Prompt Formatting

JP Assist Formatting settings

The screenshot shows an example with all three options enabled and All recognized prompt inputs selected. All three switches default to off. Blue means on and gray means off; changing a switch does not format text until you click Format.

| Control | How to use it | | --- | --- | | Format | Apply formatting to the chosen target. The top action bar also has a Format button. | | Append comma on newline | Add a comma before a following line of text; do not append one to the final line. Protected control lines and punctuation are preserved. | | Replace underscores | Change blue_hair to blue hair, preserving special syntax and underscore exclusions. | | Remove duplicate plain tags | Change smile, smile to smile within the same line. Other lines and weighted tags are preserved. | | Format target | Choose the current input/selection, selected nodes, or all recognized prompt inputs in the current workflow (the default). |

Click Format in the top action bar to format all recognized prompt inputs by default, or press Alt + Shift + F in a node input. Choose Current input / selection and click an input (or select text) to limit the edit. You do not need to reopen Settings for each edit. Settings → Danbooru Tag JP Assist → Formatting contains the target selector, another Format action, and three independent options (all off by default): duplicate plain tags, underscore replacement, and newline commas. Changing an option does not edit text until Format is invoked. Even with all options off, 1girl,, solo , smile becomes 1girl, solo, smile. Use Ctrl + Z in the input to undo.

The default target is all recognized prompt inputs. Saved target preferences are preserved; select All recognized prompt inputs once if the previous default was saved. Batch modes target selected nodes or all recognized TextEncode/Prompt/String inputs, excluding notes, JSON and code nodes. Unknown custom nodes can use the current-input mode. Commas and spacing are normalized while paragraphs and indentation remain intact. Syntax groups, model references, wildcards, artist prefixes, escapes, quoted text, score tags and underscore exclusions are protected. Incomplete syntax, JSON and partial selections inside protected tokens are left unchanged.

Focus and native browser Undo/Redo are preserved; batch edits are undone per input, not as one graph-wide action. Formatting is explicit, never on typing or queue submission, and is blocked during IME composition. The interaction design is inspired by comfyui-prompt-format.

Insert → Underscore exclusions accepts comma- or newline-separated patterns, such as score_*, rating_*, my_custom_tag. * matches any sequence and ? one character; plain names match whole tags. These exclusions apply when insertion's Use spaces for underscores or formatting's Replace underscores is enabled. Leave the field empty if no additional exclusions are needed. Format always protects score tags and special syntax.

Notes

  • If suggestions overlap or dragging the suggestion scrollbar dismisses JP Assist, disable Text Autocomplete under Settings → pysssss. That separate extension provides Embedding/LoRA suggestions; JP Assist does not automatically fetch those model lists.

  • Autocomplete is attached to multiline text areas owned by ComfyUI nodes, not general Settings or modal text areas.

  • The GitHub repository does not include danbooru_tags.csv.

  • The downloaded danbooru_tags.csv keeps the original filename and original content.

  • User tag files should be placed under tags/tag_files/.

  • Japanese translation or alias files should be placed under tags/translation_files/.

  • Large All combinations may take longer on the first search than choosing a single CSV.

  • If no tag file is available, no suggestion popup is shown.

License

The source code is released under the MIT License.

Bundled tag and translation data may include modified third-party data. See THIRD_PARTY_NOTICES.md for source attribution and usage terms.

Settings language, help and local dictionary policy

Local MOSS BBOX integration (unreleased): custom Scene/Background and Character/Object color/ID prompt fields participate in All and Selected formatting with the matching MOSS update. Literal Text wording stays out of batch formatting. Choose Current input / selection, focus a field and press Format to explicitly format lettering, appearance notes or a selection. Nothing is formatted on blur or tab changes. This uses explicit data-jp-assist-format="prompt" / "literal" field markers; unmarked custom controls keep the existing recognition rules.

Settings labels, choices, groups and hover help follow Comfy.Locale: Japanese for ja, English for every other locale. Switching language updates presentation without changing stored IDs, values, CSV choices or order. Hover over a setting's help indicator or the CSV checkbox, order arrow, reload or Format button for instructions.

Existing applies the legacy tag insertion rules. CSV-aware follows insert_mode: tag/phrase use the comma preference, word uses spaces, raw inserts the original text. This is separate from Completion unit (searching a word after spaces versus a comma-separated tag).

New tag selections prefer tags_merged_dedup.csv; saved choices remain intact. The retired danbooru_2025.csv is neither bundled nor downloaded. All Hugging Face CSV checking/downloading is removed, even with an old saved AutoUpdateHf=true or calls from an old browser client. Existing local files remain usable. Add new CSVs manually and use Reload dictionaries, then select the files explicitly.

ComfyUI and Forge Neo still differ: ComfyUI defaults to legacy insertion; unspecified natural-language modes use word, while Neo infers phrase for multi-word entries. Neo also uses NFKC search normalization, recursively scans dictionary folders and shows a total-hit header. ComfyUI limits a search to 500 candidates and has no total-hit header. Forge-specific LoRA/Embedding/wildcard execution is not ported. To bring separator rules closer, specify source_type / insert_mode explicitly and match CSV order and comma preferences. The replacement range still differs: completing soft nat to soft natural lighting in ComfyUI Word mode retains the first soft, producing soft soft natural lighting; Neo replaces the matching phrase prefix. This UI update does not change that behavior. These are source-level comparisons, not a live side-by-side or physical IME verification.

After an update, save your workflow and reload the browser for the translated Settings. The Python change that disables legacy update API calls requires the next ComfyUI restart; an already running old server retains its previous API implementation until then. The new UI never calls that endpoint.

CSV controls and personal usage ranking (v0.5.0)

Use the separate ordered tag and translation checklists under Files. Select all keeps the current order and appends other available CSVs; Clear selection stays empty. New files are not selected automatically. Legacy CSV settings groups the old source, single-file and mode controls in a collapsible section. Saved legacy modes still work; inactive checklists say so and offer Use selected CSVs. Existing choices are retained.

Autocomplete → Prioritize frequently used candidates defaults to OFF. While ON, each successful Enter, Tab or mouse completion adds one use. Searching, Escape, IME confirmation and failed/stale edits do not count. CSV priority remains first, then personal use count, then the selected sort mode for ties. Ranking happens before the 20/500 result limit. Alias/Japanese searches count toward the original candidate, while different source CSVs, source types, category schemes and insertion modes keep separate histories. Unselected dictionaries stay excluded; CSV post counts are unchanged.

History stays in browser local storage for the current ComfyUI origin (shared by ComfyUI users using that same browser profile and address). It retains the most recently used 2,000 candidate identities and completion counts, never full prompts or search queries. Counts are sent to the same ComfyUI server for ranking only; they are not written to CSVs or workflows. If storage is unavailable, history lasts only for the open page. Clear usage history erases only these counts. Switching OFF stops recording and ranking but retains history. Undo restores text without subtracting uses; positive and negative prompts share counts. Forge histories, age limits and logarithmic weighting are not imported.

Show up to 500 candidates ignores the numeric limit when ON; switch it OFF to use a limit such as 20. It is neither unlimited nor a total-hit counter. Labels, options and hover help follow Japanese UI, with English for other locales. Load the frontend changes on your next browser reload; usage ranking also requires the updated backend on your next ComfyUI start. Until then, normal completion remains available and Settings explains the missing ranking support. This update does not restart ComfyUI.