[GH-ISSUE #3725] Feature Request: Persistent style reference ("style plate") for NovelAI V4.5 #2009

Closed
opened 2026-10-21 05:44:33 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Feature Request: Persistent style reference ("style plate") for NovelAI V4.5

Summary

Allow a single user-supplied image to be applied as an always-on, style-only precise reference on every NovelAI V4.5 generation, so that art style stays consistent across an entire playthrough without attaching a reference to each character or each request.

Problem

NovelAI V4.5's precise references (director references) support a style-only mode, and it's very effective at locking a consistent art style across generations. But Marinara currently only sends references that are attached per-character (avatar/reference images), and always in character&style mode.

That leaves a gap: there's no way to say "apply this art style to every image in my game, regardless of which characters are in the scene." Users who want visual consistency across a long playthrough currently get style drift between generations, and the only workaround is repeating style tags in the prompt — which is far weaker than an actual style reference.

This also matters for scenes with no characters (establishing shots, environments), where there's no avatar reference to piggyback on, so those images drift stylistically from the character scenes.

Proposed behavior

A single "style plate" image configured once, which Marinara sends as an additional precise reference on every NovelAI V4.5 generation:

  • Applied in style-only mode (base_caption: "style"), independent of any character references.
  • Sent as the first reference, with per-character avatar references (if any) following it.
  • Applies to every generation, including ones with no character references at all.
  • Has its own strength/fidelity, separate from avatar references (a style plate usually wants lower strength than a character reference — mine sits around 0.4 strength).
  • Only active on V4.5 precise-reference-capable models; silently inactive otherwise, so nothing breaks on other models/providers.

Working implementation

Running locally against packages/server/src/services/image/image-generation.ts. The core of it:

  • Load the plate image as base64 and prepend it to the reference list.
  • Build a per-image metadata array ({mode, strength, fidelity}) aligned positionally with the images, so the plate can be style at its own values while avatars stay character&style at theirs.
  • Map that array into director_reference_descriptions, director_reference_strength_values, and director_reference_secondary_strength_values, instead of the current uniform .map(() => constant) calls.

The main structural change is exactly that last point: the current code hardcodes one mode and one strength/fidelity for all references, so per-reference settings aren't expressible. Making those arrays per-image is a prerequisite for this feature (and is generally useful — see related note below).

Happy to open a PR.

Open questions / design notes

  • Where the image lives: my local version reads style-plate.png from the module's own directory, using file presence as the on/off toggle. That's fine as a hack but wrong for a shipped feature — it lives in dist/ and gets wiped on rebuild, and users shouldn't be editing dist. Upstream this should be a proper setting: a file picker in the image settings, or a configured path, stored with the user's data.
  • Settings needed: enable/disable, image, strength, fidelity. My version currently uses env vars (NOVELAI_PLATE_STRENGTH, NOVELAI_PLATE_FIDELITY) as a stopgap.
  • Per-scope plates: possibly worth scoping per-game/per-world rather than one global plate, since different stories may want different art styles.
  • Mode choice: I hardcode style-only, but exposing style / character / character&style would be more flexible.

Separate from the style plate itself, the current code applies identical values to every reference:

director_reference_descriptions        = images.map(() => ({ caption: { base_caption: "character&style" ... }}))
director_reference_information_extracted = images.map(() => 1)
director_reference_strength_values       = images.map(() => 1)
director_reference_secondary_strength_values = images.map(() => 0)

So a user can't set different strengths for different references, and the web UI's Strength/Fidelity controls have no Marinara equivalent at all. Making these per-image (as this feature requires) would also enable exposing Strength/Fidelity in the UI, which several users would likely want independently of the style plate.

Originally created by @jswen4-tech on GitHub (Jul 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3725 Originally assigned to: @SpicyMarinara on GitHub. # Feature Request: Persistent style reference ("style plate") for NovelAI V4.5 ## Summary Allow a single user-supplied image to be applied as an always-on, style-only precise reference on every NovelAI V4.5 generation, so that art style stays consistent across an entire playthrough without attaching a reference to each character or each request. ## Problem NovelAI V4.5's precise references (director references) support a **style-only** mode, and it's very effective at locking a consistent art style across generations. But Marinara currently only sends references that are attached per-character (avatar/reference images), and always in `character&style` mode. That leaves a gap: there's no way to say "apply *this* art style to every image in my game, regardless of which characters are in the scene." Users who want visual consistency across a long playthrough currently get style drift between generations, and the only workaround is repeating style tags in the prompt — which is far weaker than an actual style reference. This also matters for scenes with **no characters** (establishing shots, environments), where there's no avatar reference to piggyback on, so those images drift stylistically from the character scenes. ## Proposed behavior A single "style plate" image configured once, which Marinara sends as an additional precise reference on every NovelAI V4.5 generation: - Applied in **style-only** mode (`base_caption: "style"`), independent of any character references. - Sent as the **first** reference, with per-character avatar references (if any) following it. - Applies to **every** generation, including ones with no character references at all. - Has its **own strength/fidelity**, separate from avatar references (a style plate usually wants lower strength than a character reference — mine sits around 0.4 strength). - Only active on V4.5 precise-reference-capable models; silently inactive otherwise, so nothing breaks on other models/providers. ## Working implementation Running locally against `packages/server/src/services/image/image-generation.ts`. The core of it: - Load the plate image as base64 and prepend it to the reference list. - Build a per-image metadata array (`{mode, strength, fidelity}`) aligned positionally with the images, so the plate can be `style` at its own values while avatars stay `character&style` at theirs. - Map that array into `director_reference_descriptions`, `director_reference_strength_values`, and `director_reference_secondary_strength_values`, instead of the current uniform `.map(() => constant)` calls. The main structural change is exactly that last point: the current code hardcodes one mode and one strength/fidelity for **all** references, so per-reference settings aren't expressible. Making those arrays per-image is a prerequisite for this feature (and is generally useful — see related note below). Happy to open a PR. ## Open questions / design notes - **Where the image lives:** my local version reads `style-plate.png` from the module's own directory, using file presence as the on/off toggle. That's fine as a hack but wrong for a shipped feature — it lives in `dist/` and gets wiped on rebuild, and users shouldn't be editing `dist`. Upstream this should be a proper setting: a file picker in the image settings, or a configured path, stored with the user's data. - **Settings needed:** enable/disable, image, strength, fidelity. My version currently uses env vars (`NOVELAI_PLATE_STRENGTH`, `NOVELAI_PLATE_FIDELITY`) as a stopgap. - **Per-scope plates:** possibly worth scoping per-game/per-world rather than one global plate, since different stories may want different art styles. - **Mode choice:** I hardcode style-only, but exposing `style` / `character` / `character&style` would be more flexible. ## Related: per-reference strength/fidelity Separate from the style plate itself, the current code applies identical values to every reference: ```js director_reference_descriptions = images.map(() => ({ caption: { base_caption: "character&style" ... }})) director_reference_information_extracted = images.map(() => 1) director_reference_strength_values = images.map(() => 1) director_reference_secondary_strength_values = images.map(() => 0) ``` So a user can't set different strengths for different references, and the web UI's Strength/Fidelity controls have no Marinara equivalent at all. Making these per-image (as this feature requires) would also enable exposing Strength/Fidelity in the UI, which several users would likely want independently of the style plate.
bsakaguchi 2026-10-21 05:44:33 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 17, 2026):

Resolved by #3732, now merged into staging.

<!-- gh-comment-id:5000939569 --> @SpicyMarinara commented on GitHub (Jul 17, 2026): Resolved by #3732, now merged into staging.
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#2009
No description provided.