Nodes/ComfyUI-Prompt-Format-Converter/Artist Prefix Converter
ComfyUI Node

Artist Prefix Converter

Wlop into @wlop without touching a single weight

By zisonMyu·Created 4 months ago·Updated 3 months ago· 2
Artist Prefix Converter
    • converted_prompt
    • detected_source_prefix
    prompt
    source_prefix
    target_prefix
    use_exact_artist_detectionfalse
    artist_csv_path/tmp/ComfyUI/custom_nodes/ComfyUI-Prompt-Format-Converter/data/danbooru_artist.csv

    Say you have a NoobAI prompt written the NoobAI way - artist:wlop - and you want to run it on an Anima-based model where the convention is @wlop or plain. The weights are all correct, the other tags are all correct, you just need the artist prefix rebadged. Rewriting every artist tag by hand is a recipe for missing one. ArtistPrefixConverter does exactly that surgical job: it swaps artist prefixes across a full prompt while leaving the weight syntax completely untouched.

    This is what makes it distinct from the pack's main PromptFormatConverter, which changes the whole dialect - weights and prefixes together. This node changes only the prefix axis. If your prompt is already in the right weight dialect and you're only moving between @, artist:, and plain, this is the leaner, safer tool: fewer transformations means fewer things to go wrong.

    How it works

    The source_prefix dropdown is Auto-detect, @ - SD(anima), artist: - NAI, or none - plain SD. Auto-detect scans the prompt for @ or artist: markers and reports what it found in detected_source_prefix. target_prefix is where you're going: plain, @, or artist:. Under the hood it's regex replacement - find every @name and rewrite it as artist:name, or vice versa - and converted_prompt comes back with everything else byte-for-byte intact.

    There's one genuinely useful escalation built in: use_exact_artist_detection. Turn it on (with artist_csv_path pointing at the Danbooru artist CSV, which the pack's DanbooruArtistCSVManager node downloads for you) and it can also convert plain SD artist tags - the ambiguous ones with no prefix - into @wlop or artist:wlop. That's the case where the node becomes magic rather than clerical: it only prefixes names it can confirm are real artists, and leaves ordinary tags like 1girl alone. Without the CSV, plain tags can't be identified, so converting none - plain SD into a prefixed format will simply return the prompt unchanged.

    Inputs worth knowing

    • prompt - your full prompt with weights, other tags, everything.
    • source_prefix / target_prefix - the two ends of the swap; Auto-detect handles the source for you in almost all cases.
    • use_exact_artist_detection + artist_csv_path - the power pair, but only if you've downloaded the CSV first.

    Install and gotchas

    Install as always: search "ComfyUI-Prompt-Format-Converter" in Manager or git clone https://github.com/zisonMyu/ComfyUI-Prompt-Format-Converter into custom_nodes, then restart. No dependencies.

    The common trip-up is expecting plain-tag detection to work out of the box. It doesn't - there's no way to distinguish wlop from 1girl without a name list, and this node won't pretend otherwise. If you're converting a plain-SD prompt and the output comes back identical, that's the CSV missing, not the node broken. Download it, flip on exact detection, and rerun.

    CategoryPrompt Tools

    Inputs (5)

    NameTypeDefaultDescription
    promptSTRING
    source_prefixCOMBO4 options: Auto-detect, @ - SD(anima), artist: - NAI, none - plain SD
    target_prefixCOMBO3 options: none - plain SD, @ - SD(anima), artist: - NAI
    use_exact_artist_detectionBOOLEANfalse
    artist_csv_pathSTRING/tmp/ComfyUI/custom_nodes/ComfyUI-Prompt-Format-Converter/data/danbooru_artist.csv

    Outputs (2)

    NameTypeDescription
    converted_promptSTRING
    detected_source_prefixSTRING