Convert Novel AI V4 to Old NAI
Port a NovelAI V4 prompt back to the old brace syntax
- novelai_old_prompt
NovelAI moved to numeric weight scopes with V4, but a lot of the model zoo didn't move with it. V3, Furry V3, and every V3-era derivative still want the old {tag} / [tag] brace syntax - and if you've tuned a prompt against V4's 1.2::scoped ranges, porting it back to an old model by hand is exactly the kind of arithmetic nobody wants to do twice. NovelAIV4ToOldNAI does it for you: numeric scope in, brace/bracket prompt out.
Pure text node, same shape as the rest of the pack's converters: one input, one output, no token, no network.
How it works
It parses the V4 numeric-scope syntax into the shared (text, weight) tag list, then serializes that to old NAI's brace/bracket notation. The old format's weights are powers of 1.05 (up) and 0.95 (down), so the converter maps each numeric weight to the nearest power and stacks brackets to match: 1.1 becomes {{tag}} (1.05²), 1.16 becomes {{{tag}}} (1.05³), 0.9 becomes a [-stack. Consecutive tags with the same bracketing are merged, so 1.05::tag1 ::, 1.05::tag2 :: collapses into the tidy {tag1, tag2}.
The honest part is what gets lost in translation:
- Negative and zero weights have no home here. Old NAI can't represent them, so they fall back to
[text]- the plain 0.95 decrease - with a warning in the console. If your V4 prompt leans on a-1.5::negative ::style down-weight, expect the old-model version to be blunter. - Arbitrary decimals get snapped.
1.21::tag ::is a clean{{tag}};1.13::tag ::lands on the nearest representable power and the exact value is gone.
So this converter is the pragmatic bridge, not a lossless codec. Its real job is getting a V4-flavored prompt close enough that an old model responds the way you intend - which, for brace-syntax models, it does.
Inputs and output
novelai_v4_prompt- the V4 numeric-scope source, multiline.- Output:
novelai_old_prompt- the brace/bracket version for old NovelAI models.
Install
With ComfyUI_RS_NAI_API_Request, via ComfyUI Manager or:
cd ComfyUI/custom_nodes
git clone https://github.com/raspie10032/ComfyUI_RS_NAI_API_Request.git
pip install -r requirements.txt
Restart after installing. No token required.
Gotchas
Watch the console output. Every time a negative or zero weight gets downgraded to [...], the node prints a warning - if you convert a prompt and don't spot the warnings, you've probably lost a down-weight you intended to keep. For prompts where negatives matter, the Old-NAI target is genuinely the wrong format; consider keeping that prompt on V4 models instead.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| novelai_v4_prompt | STRING | 1.05::tag1::, 0.9::tag3::, 1.2::tag4::, 1.1::misty, golden hour::, -1.5::negative tag::, 0::zero weight tag:: | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| novelai_old_prompt | STRING | — |