mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5343] [Feature]: NovelAi Diffusion v5 Support #2954
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#2954
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?
Originally created by @ylli-selmani on GitHub (Aug 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5343
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
NovelAI released Diffusion v5 (model IDs nai-diffusion-5-full and nai-diffusion-5-curated). Attempting to generate an image with either model in Marinara Engine results in an internal server error (500). The model is selected successfully but the generation request fails because the code does not recognize v5 model IDs as V4+ models, so the request is sent using the legacy pre-V4 parameter format instead of the params_version: 3 format with v4_prompt / v4_negative_prompt structures that the newer API expects.
Proposed solution
Extend the three hardcoded NovelAI model-name regex patterns to also match v5 model IDs:
This ensures v5 models are routed through the V4+ code path with the correct params_version: 3 and v4_prompt / v4_negative_prompt request structures.
Also, include the new models in model-lists.ts's const IMAGE_GEN_MODELS: KnownModel[] = [], to appear in the Model List for easier picking, than manually writing out the model.
Alternatives considered
Hardcoding v5 as a separate model tier with its own request format. Rejected because NovelAI's v5 API uses the same V4+ parameter format, so extending the existing regex is the minimal correct fix. Also because it'd take a lot of edits, since 4.5 is explicitly mentioned in many, many places as a fallback model, etc.
Additional context
related issue: #5344 - The model list drop down doesn't show the new models, so the user would have to guess the exact id of it.
personal fix Tested locally: after the regex changes, image generation with both nai-diffusion-5-full and nai-diffusion-5-curated succeeds.
this barebones fix would not change the fact that 4.5 is still the fall back model, default model, and mentioned by name is other places.
Screenshot of current behaviour:

Screenshot with local fix:

Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: