[GH-ISSUE #3758] [Issue]: v2.3.3 — Dynamic resolution works, but the image generation UI displays the pre-resolution dimensions #2025

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Follow-up to #3726 / #3732.

Correction to my original report: I initially filed this as "dynamic resolution has no effect." That was wrong — the feature works. The generated images are the correct dimensions. The problem is that the size shown in the image generation UI reports the requested/configured dimensions rather than the resolved size that was actually sent, which is what made it look broken.

Actual

  • Generated files are correctly sized: portrait (832×1216) for a single subject, landscape (1216×832) for three or more — resolveNovelAiSize is doing its job.
  • The image generation page displays the connection's configured/requested dimensions instead, so the reported size doesn't match the file that was produced.

Expected

The displayed size should reflect the dimensions actually requested from NovelAI (i.e. the value returned by resolveNovelAiSize), so it matches the generated image.

Why it's worth fixing

It's cosmetic, but actively misleading: it makes a working feature look like it's doing nothing. I only realised the feature worked after checking the generated files' actual pixel dimensions — the UI had me convinced it was broken, and I filed it as such.

Notes

  • Reproduced on a brand-new NovelAI connection with Choose resolution from character count enabled and an empty Prompt Prefix.
  • Suggest the label read the resolved size rather than request.width / request.height.

Separate latent issue in the same code path

Unrelated to the display bug above, but noticed while looking into this — resolveNovelAiSize is called with mergedPrompt:

// ~L1396
const mergedPrompt = mergePromptPrefix(defaults.promptPrefix, request.prompt);
const prompt = prepareNovelAiPrompt(mergedPrompt, "prompt", model);
// ...
// ~L1414
const size = resolveNovelAiSize(request, mergedPrompt, defaults);

mergedPrompt includes the connection's Prompt Prefix. Since detectNovelAiSubjectCount scans everything before the first | and sums every count token it finds:

for (const match of subjectTokens)
    tokenCount += Number.parseInt(match[1] ?? "0", 10);

…any count token in a Prompt Prefix would be added to the scene's subject count. E.g. a prefix containing 2girls plus a 1boy scene resolves to 3 → landscape instead of portrait.

This doesn't affect me (my Prompt Prefix is empty), but it looks unintended. Passing prompt (the prepared scene prompt) rather than mergedPrompt would keep prefix text out of subject detection.

Also worth a look — upgrade path for existing profiles

function resolveNovelAiDefaults(request) {
    if (request.imageDefaults?.service === "novelai" && request.imageDefaults.novelai) {
        return request.imageDefaults.novelai;
    }
    return DEFAULT_NOVELAI_DEFAULTS;
}

This returns the stored profile as-is rather than merging it over the defaults. NovelAI profiles saved before v2.3.3 won't contain dynamicResolutionBySubjectCount, styleReferenceStrength, or styleReferenceFidelity, so those features would silently no-op for existing users on upgrade.

The editor masks this, since it fills gaps via value.novelai ?? createDefaultImageGenerationProfile("novelai").novelai! — the checkbox still appears ticked even if the key never reaches the server.

Something like:

return { ...DEFAULT_NOVELAI_DEFAULTS, ...request.imageDefaults.novelai };

Environment

  • Marinara Engine v2.3.3, Windows, launched via MarinaraLauncher.exe
  • Stock install — no local modifications
  • NovelAI native API (https://image.novelai.net), model nai-diffusion-4-5-full, Opus tier

Apologies for the inaccurate original title — happy to test any fix.

Originally created by @jswen4-tech on GitHub (Jul 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3758 Originally assigned to: @SpicyMarinara on GitHub. Follow-up to #3726 / #3732. **Correction to my original report:** I initially filed this as "dynamic resolution has no effect." That was wrong — the feature works. The generated images **are** the correct dimensions. The problem is that the size shown in the image generation UI reports the *requested/configured* dimensions rather than the resolved size that was actually sent, which is what made it look broken. ## Actual - Generated files are correctly sized: portrait (832×1216) for a single subject, landscape (1216×832) for three or more — `resolveNovelAiSize` is doing its job. - The image generation page displays the connection's configured/requested dimensions instead, so the reported size doesn't match the file that was produced. ## Expected The displayed size should reflect the dimensions actually requested from NovelAI (i.e. the value returned by `resolveNovelAiSize`), so it matches the generated image. ## Why it's worth fixing It's cosmetic, but actively misleading: it makes a working feature look like it's doing nothing. I only realised the feature worked after checking the generated files' actual pixel dimensions — the UI had me convinced it was broken, and I filed it as such. ## Notes - Reproduced on a **brand-new** NovelAI connection with **Choose resolution from character count** enabled and an empty Prompt Prefix. - Suggest the label read the resolved size rather than `request.width` / `request.height`. --- ## Separate latent issue in the same code path Unrelated to the display bug above, but noticed while looking into this — `resolveNovelAiSize` is called with `mergedPrompt`: ```js // ~L1396 const mergedPrompt = mergePromptPrefix(defaults.promptPrefix, request.prompt); const prompt = prepareNovelAiPrompt(mergedPrompt, "prompt", model); // ... // ~L1414 const size = resolveNovelAiSize(request, mergedPrompt, defaults); ``` `mergedPrompt` includes the connection's **Prompt Prefix**. Since `detectNovelAiSubjectCount` scans everything before the first `|` and **sums every count token it finds**: ```js for (const match of subjectTokens) tokenCount += Number.parseInt(match[1] ?? "0", 10); ``` …any count token in a Prompt Prefix would be added to the scene's subject count. E.g. a prefix containing `2girls` plus a `1boy` scene resolves to 3 → landscape instead of portrait. This doesn't affect me (my Prompt Prefix is empty), but it looks unintended. Passing `prompt` (the prepared scene prompt) rather than `mergedPrompt` would keep prefix text out of subject detection. ## Also worth a look — upgrade path for existing profiles ```js function resolveNovelAiDefaults(request) { if (request.imageDefaults?.service === "novelai" && request.imageDefaults.novelai) { return request.imageDefaults.novelai; } return DEFAULT_NOVELAI_DEFAULTS; } ``` This returns the stored profile as-is rather than merging it over the defaults. NovelAI profiles saved **before** v2.3.3 won't contain `dynamicResolutionBySubjectCount`, `styleReferenceStrength`, or `styleReferenceFidelity`, so those features would silently no-op for existing users on upgrade. The editor masks this, since it fills gaps via `value.novelai ?? createDefaultImageGenerationProfile("novelai").novelai!` — the checkbox still appears ticked even if the key never reaches the server. Something like: ```js return { ...DEFAULT_NOVELAI_DEFAULTS, ...request.imageDefaults.novelai }; ``` ## Environment - Marinara Engine **v2.3.3**, Windows, launched via `MarinaraLauncher.exe` - Stock install — no local modifications - NovelAI native API (`https://image.novelai.net`), model `nai-diffusion-4-5-full`, Opus tier --- Apologies for the inaccurate original title — happy to test any fix.
bsakaguchi 2026-10-21 05:44:41 +07:00
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#2025
No description provided.