[GH-ISSUE #4657] [Issue]: Illustrator compaction pass (#3728, v2.3.3) destroys NovelAI multi-character tag templates, rewriting them into prose #2549

Closed
opened 2026-10-21 05:49:57 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @jswen4-tech on GitHub (Aug 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4657

Summary

Since v2.3.3, the built-in Illustrator agent no longer honors a custom NovelAI-format Prompt Template. The image-prompt compaction/length-limiting step added in #3728 ("Prevented duplicate style and appearance instructions in image-generation prompts while preserving configured styles through compact-token and final prompt-length limits") collapses a booru-tag, pipe-joined, multi-character prompt into a single natural-language scene description. The custom template still shows as an active override, but its structured output is discarded downstream. This worked correctly before v2.3.3.

Expected behavior

When a custom Illustrator Prompt Template produces a NovelAI Diffusion 4.5 multi-character prompt in the documented base | character1 | character2 format, the pipeline should preserve that structure verbatim (tag lists, pipe separators, per-character blocks, NgirlsMboys count tokens, locked style tags), the same way it did prior to v2.3.3. Tag-based prompts should not be run through the duplicate-style/appearance compaction and length-distillation intended for natural-language prompts.

Actual behavior

The generated prompt is rewritten into prose. The pipe-joined character-block structure is flattened, the leading count/style tokens are dropped, and character handles are replaced with story names (which the template explicitly forbids inside blocks).

Intended output (produced by the template, sent to NovelAI pre-2.3.3):

2girls, 1boy, very aesthetic, masterpiece, amazing quality, absurdres, depth of field, clean line art, drafty wooden shack, interior, day, dim grey light | adult blonde elf girl, long blonde hair, glowing blue eyes, pointed ears, ... | adult human man, rugged face, ...

Actual output (v2.3.3+):

Dark fantasy, gritty realism, cinematic lighting, visceral textures, high detail, moody and oppressive atmosphere, A dark, high-contrast cinematic scene inside a dimly lit, derelict wooden shack. In the center, Prince Jaey, a tall, powerfully built man with wavy brown hair, ...

The template is unchanged and still displays as the active "Custom override." The prompt-writing model does not matter (reproduced with Gemma and others), which indicates the rewrite happens in the pipeline after the prompt model, not in the model output.

Steps to reproduce
Configure a NovelAI Diffusion 4.5 Full image connection.
Add the Illustrator agent to a Roleplay chat, Prompt Mode = Illustration.
In the Illustrator Prompt Template, paste a custom template that outputs a NovelAI multi-character prompt in base | block | block format (count token + locked style tags + scene, then one pipe-separated tag block per character).
Trigger an illustration on a multi-character scene.
Inspect the generated prompt in the Gallery: the structured tag output has been rewritten into a single natural-language description.
Impact area
App shell, navigation, startup, or providers
Catalog resources
Chat mode
Roleplay mode
Game mode
Shared mode UI
Runtime systems: generation, world-state, visuals, tracker, or haptics
React-free engine behavior, contracts, agents, or capability ports
Shared API wrapper or remote runtime routing
Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
Docs, contributor workflow, or templates
Environment
Branch or commit: [your version, e.g. v2.4.1 stable]
Run mode: [Docker / Windows / Termux / etc.]
OS + version: [your OS]
Node + pnpm versions: [if known, else "not relevant"]
Rust version, if relevant: not relevant
Remote Runtime URL configured? No
Provider, model, or integration, if relevant: NovelAI Diffusion 4.5 Full image connection; prompt-writing model Gemma (also reproduced with others)
Regression notes

Worked before v2.3.3. The behavior change corresponds to #3728 ("Prevented duplicate style and appearance instructions in image-generation prompts while preserving configured styles through compact-token and final prompt-length limits"), released in v2.3.3. The related NovelAI 4.5 prompt-path rework in the same release (#3725/#3726, persistent NovelAI V4.5 style plates + subject-count framing) may also be relevant. The compaction pass appears to treat the intentional repetition in a NovelAI multi-character tag prompt (locked style block, pipe separators, per-character identity phrases) as duplicate style/appearance instruction and collapse it, then distill the remainder to fit length limits — which is correct for natural-language prompts but destroys tag-based ones.

Additional context

There is no user-facing setting to opt out of the compaction pass for tag-based prompts, so a custom NovelAI template cannot work around it; the rewrite happens after the template runs. Requested outcomes:

When the Illustrator's target is a NovelAI/booru-tag prompt (or when a custom Prompt Template is active), skip or bypass the duplicate-style/appearance compaction and length-distillation so the structured tag output reaches NovelAI verbatim; or
Expose an explicit "preserve raw prompt / disable compaction" toggle on the Illustrator agent for tag-based image models.

Originally created by @jswen4-tech on GitHub (Aug 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4657 Summary Since v2.3.3, the built-in Illustrator agent no longer honors a custom NovelAI-format Prompt Template. The image-prompt compaction/length-limiting step added in #3728 ("Prevented duplicate style and appearance instructions in image-generation prompts while preserving configured styles through compact-token and final prompt-length limits") collapses a booru-tag, pipe-joined, multi-character prompt into a single natural-language scene description. The custom template still shows as an active override, but its structured output is discarded downstream. This worked correctly before v2.3.3. Expected behavior When a custom Illustrator Prompt Template produces a NovelAI Diffusion 4.5 multi-character prompt in the documented base | character1 | character2 format, the pipeline should preserve that structure verbatim (tag lists, pipe separators, per-character blocks, NgirlsMboys count tokens, locked style tags), the same way it did prior to v2.3.3. Tag-based prompts should not be run through the duplicate-style/appearance compaction and length-distillation intended for natural-language prompts. Actual behavior The generated prompt is rewritten into prose. The pipe-joined character-block structure is flattened, the leading count/style tokens are dropped, and character handles are replaced with story names (which the template explicitly forbids inside blocks). Intended output (produced by the template, sent to NovelAI pre-2.3.3): 2girls, 1boy, very aesthetic, masterpiece, amazing quality, absurdres, depth of field, clean line art, drafty wooden shack, interior, day, dim grey light | adult blonde elf girl, long blonde hair, glowing blue eyes, pointed ears, ... | adult human man, rugged face, ... Actual output (v2.3.3+): Dark fantasy, gritty realism, cinematic lighting, visceral textures, high detail, moody and oppressive atmosphere, A dark, high-contrast cinematic scene inside a dimly lit, derelict wooden shack. In the center, Prince Jaey, a tall, powerfully built man with wavy brown hair, ... The template is unchanged and still displays as the active "Custom override." The prompt-writing model does not matter (reproduced with Gemma and others), which indicates the rewrite happens in the pipeline after the prompt model, not in the model output. Steps to reproduce Configure a NovelAI Diffusion 4.5 Full image connection. Add the Illustrator agent to a Roleplay chat, Prompt Mode = Illustration. In the Illustrator Prompt Template, paste a custom template that outputs a NovelAI multi-character prompt in base | block | block format (count token + locked style tags + scene, then one pipe-separated tag block per character). Trigger an illustration on a multi-character scene. Inspect the generated prompt in the Gallery: the structured tag output has been rewritten into a single natural-language description. Impact area App shell, navigation, startup, or providers Catalog resources Chat mode Roleplay mode Game mode Shared mode UI Runtime systems: generation, world-state, visuals, tracker, or haptics React-free engine behavior, contracts, agents, or capability ports Shared API wrapper or remote runtime routing Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime Docs, contributor workflow, or templates Environment Branch or commit: [your version, e.g. v2.4.1 stable] Run mode: [Docker / Windows / Termux / etc.] OS + version: [your OS] Node + pnpm versions: [if known, else "not relevant"] Rust version, if relevant: not relevant Remote Runtime URL configured? No Provider, model, or integration, if relevant: NovelAI Diffusion 4.5 Full image connection; prompt-writing model Gemma (also reproduced with others) Regression notes Worked before v2.3.3. The behavior change corresponds to #3728 ("Prevented duplicate style and appearance instructions in image-generation prompts while preserving configured styles through compact-token and final prompt-length limits"), released in v2.3.3. The related NovelAI 4.5 prompt-path rework in the same release (#3725/#3726, persistent NovelAI V4.5 style plates + subject-count framing) may also be relevant. The compaction pass appears to treat the intentional repetition in a NovelAI multi-character tag prompt (locked style block, pipe separators, per-character identity phrases) as duplicate style/appearance instruction and collapse it, then distill the remainder to fit length limits — which is correct for natural-language prompts but destroys tag-based ones. Additional context There is no user-facing setting to opt out of the compaction pass for tag-based prompts, so a custom NovelAI template cannot work around it; the rewrite happens after the template runs. Requested outcomes: When the Illustrator's target is a NovelAI/booru-tag prompt (or when a custom Prompt Template is active), skip or bypass the duplicate-style/appearance compaction and length-distillation so the structured tag output reaches NovelAI verbatim; or Expose an explicit "preserve raw prompt / disable compaction" toggle on the Illustrator agent for tag-based image models.
bsakaguchi 2026-10-21 05:49:57 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2549
No description provided.