mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5835] [CLOSED] feat(illustrator): native NovelAI character captions for roleplay illustrations #6960
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6960
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5835
Author: @stonebystone
Created: 9/4/2026
Status: ❌ Closed
Base:
staging← Head:feat/illustrator-novelai-character-prompts📝 Commits (5)
4a4c3adfeat(illustrator): native NovelAI character captions for roleplay illustrationse396368feat(illustrator): source captions from card appearance and tracker outfite75736atest(regressions): split the NovelAI caption-cap guard into its own filec8d655cfix(illustrator): split ensemble-card appearance per character before captioninga83f102refactor(illustrator): let the prompt writer own card appearance for captions📊 Changes
15 files changed (+810 additions, -89 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/media/illustrator-agent.md(+12 -0)📝
docs/media/image-providers.md(+2 -2)📝
packages/client/src/components/ui/ImagePromptReviewModal.tsx(+43 -0)📝
packages/client/src/localization/locales/en.json(+3 -0)📝
packages/server/src/routes/game.routes.ts(+25 -73)📝
packages/server/src/routes/generate.routes.ts(+56 -5)📝
packages/server/src/routes/generate/retry-agents-route.ts(+92 -5)📝
packages/server/src/services/agents/agent-executor.ts(+31 -0)📝
packages/server/src/services/generation/illustrator-background-generation.ts(+29 -0)📝
packages/server/src/services/generation/illustrator-manual-prompt-generation.ts(+7 -0)➕
packages/server/src/services/image/character-prompts.ts(+228 -0)📝
packages/server/src/services/image/image-generation.ts(+11 -4)➕
scripts/regressions/illustrator-character-prompts.regression.ts(+244 -0)➕
scripts/regressions/novelai-character-caption-cap.regression.ts(+26 -0)📄 Description
Closes #5833
Why
NovelAI V4, V4.5, and V5 accept native per-character captions with positions, which is the main lever they offer for group scenes: each character's hair, clothing, expression, and pose stay attached to that character instead of blending across the frame. Marinara already used this for game storyboards, but the roleplay Illustrator still sent one flat base prompt, so anyone who switched their image connection to NovelAI got worse multi-character illustrations than the storyboard path produced from the same scene.
Two smaller problems sat next to that gap. The caption cap was a fixed six even on V5, which accepts 22, so ensemble scenes silently lost captions past the sixth. And on V5 any reference image (Maps location, avatar refs) made the whole illustration fail, because NovelAI has not yet shipped Precise Reference for V5.
What changed
services/image/character-prompts.tsholds the caption sanitizer, default layout, model-aware limit (22 on V5, 6 on V4/V4.5), a native-NovelAI connection gate, and the prompt-writer rules. The Storyboard planner now uses it instead of its private copies.characterPromptsschema extension (via_illustratorCharacterPromptInstruction, rendered by the agent executor). No new setting: it activates only where it can be used.characterPromptsoff the prompt writer's JSON, validate them against the visible-character list, and forward them on the image request. NovelAI's request builder already maps them tochar_captionswith centers.[NAME] tags | [NAME] tagsblocks split per character, capped at 8000 chars and not subject to the lore-block field limit). The writer is the arbiter: fixed traits go into the matching caption, card clothing is a default the tracker or scene overrides, absent characters are ignored. When captions come back the server appends nothing; when the writer returns none, the classic base-prompt appearance line still applies.Validation
pnpm checknode scripts/run-regressions.mjs --filter illustrator-character-prompts(limit, gate, sanitizer, instruction block, resolver, manual-plan parsing, executor pass-through, and appearance routing into captions)node scripts/run-regressions.mjs --filter novelai-character-caption-cap(NovelAI request builder carries 22 captions on V5, 6 on V4.5)marinara_novelai_requestchunk shows twochar_captionswithuse_coords: truecharacterPromptsinstruction in the Illustrator debug prompt)Notes for reviewers
docs/media/; a[docs-i18n]follow-up issue is needed for the translated language packs.image-generation.ts; the file passes when run directly withtsx.🤖 Generated with Claude Code
https://claude.ai/code/session_01VGCLPpohNDc1uPX8HcKJ9v
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.