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.
Danbooru Tag JP Assist
Danbooru Tag JP Assist は、ComfyUI の複数行テキスト入力欄でタグ候補を表示する補完ノードです。
日本語で検索しながら、英語タグや英語の自然言語ワードをプロンプトへ入力できます。
インストール
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
すでにフォルダーがある場合は更新します。
cd D:\Codex\ComfyUI\custom_nodes\Danbooru-Tag-JP-Assist
git pull
その後、ComfyUI を再起動し、古いUIが残る場合はブラウザを Ctrl + F5 でハード更新してください。
できること
- 複数行テキスト欄でタグ候補を表示します。
- 日本語の別名や翻訳から英語タグを検索できます。
- 英語タグをプロンプトへ挿入します。
_を空白に置き換えて、Krea系の自然言語プロンプト風に入力できます。- カンマを自動で追加できます。
- 一致順、優先度/count順、A-Z順で並び替えできます。
- Danbooruタグ、自然言語辞書、自分のCSVを併用できます。
- Hugging Face の Danbooru CSV を起動時に確認し、更新があればローカルの
danbooru_tags.csvを更新できます。
最大の特徴は All モードです。複数のタグファイルや翻訳ファイルを、基本的に重複を抑えながらまとめて読み込み、ひとつの候補リストとして使えます。現在はベータ機能として扱ってください。
Hugging Face がオフライン、または元ファイルが消えている場合は、既存のローカルCSVをそのまま使います。
基本的な使い方
- ComfyUI の Settings を開きます。
Danbooru Tag JP Assistを有効にします。- まずは
Tag file: All、Translation file: Allのまま使います。 - 複数行プロンプト欄に英語または日本語を入力します。
- 候補をキーボードまたはマウスで選択します。
初期設定では以下の動作になります。
Tag file: Allは同梱の自然言語辞書と、ローカルにある Danbooru CSV を読みます。Translation file: Allは同梱の翻訳CSVを両方読みます。Tag source: Bothはローカルファイルと Hugging Face 由来の Danbooru CSV を併用します。- 同じタグが複数ファイルにある場合は、Danbooru CSV 側を優先します。
natural_language_tags.csvは軽量な英語辞書・プロンプト語彙です。Danbooruタグの代替ではありません。merged_translations_dedup.csvは Danbooru タグ用の日本語別名です。natural_language_ja.csvは自然言語辞書用の日本語別名です。
ファイル構成
タグファイルと翻訳ファイルは別フォルダーに置きます。
tags/tag_files/: 英語タグ・英語辞書CSVを置くフォルダーtags/translation_files/: 日本語翻訳・別名CSVを置くフォルダー
同梱ファイル:
tags/tag_files/natural_language_tags.csv: 軽量な英語辞書・プロンプト語彙tags/translation_files/natural_language_ja.csv: 自然言語辞書の一部に対応した日本語別名tags/translation_files/merged_translations_dedup.csv: Danbooruタグ用の日本語別名
同梱しないファイル:
tags/tag_files/danbooru_tags.csv: Hugging Face から実行時に取得します。Gitには含めません。
CSV形式
タグファイル:
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:tags/tag_files/内の1ファイル、またはAll。初期値はAllです。Translation file:tags/translation_files/内の1ファイル、またはAll。Update Danbooru CSV from Hugging Face: Hugging Face 側を確認し、変更があればdanbooru_tags.csvを更新します。List every match: 候補を多めに表示します。Suggestion count:List every matchがOFFの時の表示数です。Sort mode:Match first、Priority / count、Tag A-Z。Popup color: 候補ポップアップの色です。Use spaces for underscores:long_hairをlong hairとして挿入します。Append comma: 候補挿入後にカンマを追加します。
CSVを追加・削除したあと、Settings のリストが更新されない場合は ComfyUI を再起動してください。
注意
- 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 ComfyUI multiline text areas.
It is intended for users who want to search English Danbooru tags and English prompt vocabulary with optional Japanese aliases.
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:
cd D:\Codex\ComfyUI\custom_nodes\Danbooru-Tag-JP-Assist
git pull
Restart ComfyUI and hard refresh the browser with Ctrl + F5.
What It Does
- Shows suggestions while typing in multiline text boxes.
- 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.
- Supports local tag files, Hugging Face tag files, or both.
- Can check the Hugging Face source at startup and download/update the local
danbooru_tags.csvwhen the remote file changes.
The main feature is All mode. It can load multiple tag files and translation files together, generally suppress duplicate entries, and use them as one combined suggestion list. Treat this as a beta feature for now.
If Hugging Face is offline or the source file disappears, the node keeps using the local saved CSV.
Basic Use
- Open ComfyUI Settings.
- Enable
Danbooru Tag JP Assist. - Use the default
Tag file: AllandTranslation file: Allfirst. - Type English or Japanese text in a multiline prompt box.
- Select a suggestion with the keyboard or mouse.
Default behavior:
Tag file: Allloads the bundled natural language dictionary and the local Danbooru CSV if available.Translation file: Allloads both bundled translation files.Tag source: Bothuses local files and the Hugging Face Danbooru CSV together.- If the same tag exists in multiple files, the Danbooru CSV wins.
natural_language_tags.csvis a lightweight English dictionary and prompt vocabulary, not a Danbooru tag replacement.merged_translations_dedup.csvis for Danbooru tag Japanese aliases.natural_language_ja.csvis only for the natural language dictionary.
Tag Files
Use two separate folders:
tags/tag_files/: English tag files.tags/translation_files/: Japanese translation or alias files.
Bundled files:
tags/tag_files/natural_language_tags.csv: lightweight English dictionary and prompt vocabulary.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: downloaded from Hugging Face at runtime.
CSV Format
Tag file:
tag,category,count
1girl,0,4974288
long_hair,0,3608339
Translation file:
tag,ja,aliases
1girl,"少女,女の子,おんなのこ","少女,女の子,若い女性,girl"
long_hair,"長髪,ロングヘア","長髪,ロングヘア,髪が長い"
Settings
Tag file: one file intags/tag_files/orAll. The default isAll.Translation file: one file intags/translation_files/orAll.Update Danbooru CSV from Hugging Face: checks and updatesdanbooru_tags.csv.List every match: shows a larger result list.Suggestion count: limits displayed suggestions whenList every matchis off.Sort mode:Match first,Priority / count, orTag A-Z.Popup color: changes the suggestion popup color.Use spaces for underscores: insertslong hairinstead oflong_hair.Append comma: adds a comma after inserted suggestions.
Notes
- The GitHub repository does not include
danbooru_tags.csv. - The downloaded
danbooru_tags.csvkeeps the original filename and original content. - The natural language tag file and both translation files are bundled with the repository.
- User tag files should be placed under
tags/tag_files/. - Japanese translation or alias files should be placed under
tags/translation_files/. - Large
Allcombinations may be slower 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.