Nodes/ComfyUI NAI Prompt Converter/NovelAI to ComfyUI Prompt
ComfyUI Node

NovelAI to ComfyUI Prompt

Make NovelAI's {curly brace} prompts actually work in ComfyUI

By raspie10032·Created 2 years ago·Updated about a year ago· 2
NovelAI to ComfyUI Prompt
    • STRING
    prompt

    You copied a prompt off NovelAI - all {tag} and [[tag]] brackets - pasted it straight into a ComfyUI CLIPTextEncode, and nothing happened. No error, no crash. The braces just sit there as literal text. That's because ComfyUI's emphasis syntax isn't braces at all, it's (tag:1.3), and CLIPTextEncode has no idea what a curly brace is supposed to mean. NovelAIToComfyPrompt is the translator: feed it a NAI-style prompt, get back a string ComfyUI actually understands.

    NovelAI was the model that kicked off the whole anime-SD boom, and its brace-weighting convention spread through booru-prompt culture way beyond people who ever touched the actual site. So even if you're running Illustrious or NoobAI purely locally, there's a decent chance a prompt you're working from - copied from a Discord, a Civitai post, an old screenshot - is still written in NAI's dialect. This node exists for exactly that moment.

    How it works

    NAI's weighting stacks by nesting: {tag} strengthens a tag (roughly tag:1.05), {{tag}} strengthens it further (tag:1.10), and each additional matching brace keeps stacking in the same direction. Square brackets go the other way - [tag] weakens to about tag:0.95, [[tag]] to tag:0.90, again stacking with more brackets. The node walks the string and rewrites every bracket run into ComfyUI's (tag:weight) form.

    It's not a blind regex swap, either. NAI prompts routinely contain plain parentheses that aren't weight syntax at all - character_name (series_name) groupings and artist: tags are common in anime prompting. A naive converter would see those parens and try to read them as weights, mangling the tag. This one special-cases both patterns so they pass through untouched.

    The input and output

    There's exactly one required field: prompt, a multiline string. Paste your whole NAI prompt block in - positive or negative, it doesn't care, it's just rewriting bracket syntax wherever it finds it. The single output is an unnamed STRING - wire it straight into a CLIPTextEncode's text input (or wherever else downstream expects prompt text) and you're done.

    How to install it

    Easiest path is ComfyUI Manager - search "ComfyUI NAI Prompt Converter" and install. Manually, it's the usual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/raspie10032/ComfyUI_RS_NAI_Local_Prompt_converter
    

    then restart ComfyUI. No models, no extra pip packages, nothing to download - it's pure string manipulation, and the "Local" in the pack's name is deliberate: the author has a separate, bigger pack (ComfyUI_RS_NAI_API_Request) that actually hits NovelAI's paid image API. This one doesn't touch the network at all.

    Common issues & troubleshooting

    The converted prompt looks over-emphasized or artifacty. ComfyUI's practical weight range is roughly 0.5–1.5 before things start warping - the same range the community leans on for hand-written (tag:1.3) weights. A prompt with a lot of deeply nested braces ({{{{tag}}}}) can convert to a weight well outside that range even though it looked reasonable as NAI syntax. If a converted prompt is behaving oddly, check the original for brace runs stacked more than two or three deep.

    Tags that "worked" on NovelAI do nothing locally. This node only translates syntax - it has no idea what your local checkpoint was trained on. NovelAI's proprietary model has its own vocabulary; if a tag meant something specific there, it can be an inert token on Illustrious or NoobAI. That's a model-training mismatch, not something a syntax converter can fix.

    Nothing changes after wiring it up. Double-check the CLIPTextEncode you're actually sampling from is the one receiving this node's STRING output - it's an unnamed generic string socket, so it's easy to drag a wire into the wrong text box in a busy graph and not notice.

    Wrong direction. This node only goes NAI → ComfyUI. If you're trying to take a ComfyUI-weighted prompt back to NovelAI, that's the sibling node, ComfyToNovelAIPrompt.

    Categoryprompt

    Inputs (1)

    NameTypeDefaultDescription
    promptSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING