ComfyUI Extension: ComfyUI-Prompt-Format-Converter
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
ComfyUI custom nodes for converting prompt text between common anime image-generation formats.
Looking for a different extension?
Custom Nodes (7)
README
ComfyUI Prompt Format Converter
English | 简体中文
ComfyUI custom nodes for converting prompt text between common anime image-generation formats.
This plugin focuses on practical prompt migration work:
SDweight syntaxSD(anima)artist prefix style with@artistNAI3brace weight syntaxNAI4numericweight::tag::syntaxNewBieXML-style prompt structure- standalone artist name / artist prefix conversion
The nodes are dependency-free and run in a standard ComfyUI install.
Features
- Convert prompt formats between
SD,SD(anima),NAI3,NAI4, andNewBie - Auto-detect prompt format before conversion
- Skip conversion when the input already matches the target format
- Convert artist prefixes automatically:
- plain artist tags
@artistartist:artist
- Optional exact artist recognition with a local Danbooru artist CSV
- AI Danbooru prompt generation/classification via OpenAI-compatible APIs
- Convert standalone artist name lists with a dedicated node
- Scale explicit weights without changing the selected prompt format
- Escape literal parentheses such as
ask(askzy)toask\(askzy\) - Warn when converting heavy weights to
NAI3where deep nesting is required
Included Nodes
1. Prompt Format Converter
Main prompt conversion node.
Inputs:
promptsource_formatAuto-detectSDSD(anima)NAI3NAI4
target_formatSDSD(anima)NAI3NAI4NewBie
escape_parenthesesinclude_commentsuse_exact_artist_detectionartist_csv_path
Outputs:
converted_promptdetected_source_formatwarnings
2. Prompt Weight Scaler
Scales explicit weights while preserving the current format.
3. Danbooru Artist CSV Manager
Checks or downloads the local artist CSV used by exact artist detection.
Default source:
https://huggingface.co/datasets/Laxhar/noob-wiki/resolve/main/danbooru_artist.csv
Default local path:
data/danbooru_artist.csv
The CSV file is intentionally ignored by git because it is large. Users can update it from the node by choosing download/update, or they can set artist_csv_path to their own CSV file.
4. AI Danbooru Prompt Generator (OpenAI/OpenRouter)
Uses standard OpenAI-compatible chat/completions APIs to generate a Danbooru-ordered prompt from:
- user requirement
- original prompt (optional)
- target format (
SD/NAI3/NAI4) - custom tag order template
Provider options:
openaiopenrouter
Auth options:
- node input
api_key - env vars:
OPENAI_API_KEYOPENROUTER_API_KEY
Advanced options:
custom_base_urlfor custom OpenAI-compatible gatewaystag_order_templateandgeneral_tag_orderfor custom ordering behavior
5. Artist Tag Formatter
Formats a raw list of artist names for a target format.
6. Artist Name Converter
Converts standalone artist name lists between:
- plain SD
@ - SD(anima)artist: - NAINewBie <style>
7. Artist Prefix Converter
Converts explicit artist prefixes inside a full prompt without changing weight syntax.
Supported Conversion Rules
Weight syntax
SD -> NAI3(tag:1.05)->{tag}(tag:0.95)->[tag]
NAI3 -> SD{tag}->(tag:1.05)[tag]->(tag:0.9524)
SD -> NAI4(tag:1.2)->1.2::tag::
NAI4 -> SD1.5::tag::->(tag:1.5)
Artist prefix rules
SDwlop
SD(anima)@wlop
NAI3 / NAI4artist:wlop
NewBie- artists are placed in
<style>
- artists are placed in
Installation
Option 1: Clone into custom_nodes
cd ComfyUI/custom_nodes
git clone <your-repo-url> prompt_format_converter
Option 2: Manual copy
Copy this folder into:
ComfyUI/custom_nodes/prompt_format_converter
Then restart ComfyUI.
Example
Input:
artist:wlop, 1.2::blue hair::, 1girl
Target format: SD(anima)
Output:
@wlop, (blue hair:1.2), 1girl
Notes
plain SDartist tags can be detected with the optional Danbooru artist CSV. Without that CSV, plain artist names are still indistinguishable from ordinary tags.NewBieclassification uses heuristic tag grouping. It is designed for practical conversion, not perfect semantic parsing.- If a prompt already looks like the target format, the main converter returns it directly for performance.
File Structure
prompt_format_converter/
__init__.py
nodes.py
README.md
README.zh-CN.md
data/
danbooru_artist.csv # optional local file, ignored by git
License
MIT License. See LICENSE.
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.