[PR #2200] [MERGED] Fix NovelAI V4.5 avatar references #5461

Closed
opened 2026-10-22 04:16:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2200
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2122-novelai-v45-references


📝 Commits (2)

  • a3dec03 Fix NovelAI V4.5 avatar references
  • 699bc75 Record PR proof metadata

📊 Changes

2 files changed (+234 additions, -180 deletions)

View changed files

📝 scratch/bugfix-verification.json (+29 -170)
📝 src-tauri/src/commands/storage/images/providers.rs (+205 -10)

📄 Description

Linked issue

Closes #2122

Why this change

  • Illustrator avatar references were reaching the NovelAI image request builder, but V4.5 models were still receiving the legacy Vibe Transfer arrays. Those fields are not the precise/director-reference payload that V4.5 expects, so “Send character & persona avatars as reference images” could silently have no visible effect.

What changed

  • Added a NovelAI V4.5 reference-image branch that maps avatar references to director_reference_images, director_reference_descriptions, director_reference_information_extracted, director_reference_strength_values, and director_reference_secondary_strength_values.
  • Kept non-4.5 NovelAI V4 models on the existing legacy reference_image_multiple / strength / information-extracted arrays.
  • Added focused Rust request-capture tests for V4.5 reference payloads, V4.5 no-reference payloads, and V4 legacy reference payloads.
  • Replaced the tracked scratch verification artifact with #2122-specific proof.

Refactor impact

Primary owner:

  • Rust storage image provider request assembly.

Impact areas reviewed:

  • NovelAI native image generation payload construction.
  • Illustrator/avatar reference input path at the provider boundary.
  • V4.5 precise/director reference behavior.
  • V4 non-4.5 legacy vibe-transfer compatibility.

Boundary notes:

  • The change stays in src-tauri provider assembly. No React, engine, shared API, schema, storage format, dependency, auth, or prompt pipeline changes.

Pressure points touched:

  • src-tauri/src/commands/storage/images/providers.rs NovelAI request builder and provider tests.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Machine proof: cargo test --manifest-path src-tauri\Cargo.toml novelai_v45_reference_images_use_director_reference_fields -- --nocapture failed before the fix because the captured V4.5 request had director_reference_images as null while an avatar reference image was supplied.
  • Machine proof: cargo test --manifest-path src-tauri\Cargo.toml novelai_ -- --nocapture passed 5 focused NovelAI tests after the fix.
  • Baseline: cargo check --manifest-path src-tauri\Cargo.toml passed.
  • Baseline: pnpm check passed after installing already-locked dependencies in the isolated worktree.
  • Proof gate: node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.
  • Bunny: passed before opening this draft.
  • Manual limitation: real NovelAI generation/Anlas billing was not exercised because this environment does not have NovelAI credentials. The core request-shape claim is proven with a local request-capture server.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix only; no new discoverable user feature or setting.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

  • N/A. This is a backend/provider request-shape fix with local request-capture proof rather than a visible UI change.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed "Send avatars as reference images" functionality for NovelAI V4.5 models, which previously produced no output without error notification.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2200 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2122-novelai-v45-references` --- ### 📝 Commits (2) - [`a3dec03`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a3dec03be46be1db212016e3ba7ffae009f39f27) Fix NovelAI V4.5 avatar references - [`699bc75`](https://github.com/Pasta-Devs/Marinara-Engine/commit/699bc75cd37aea834f6677816734837a6532b970) Record PR proof metadata ### 📊 Changes **2 files changed** (+234 additions, -180 deletions) <details> <summary>View changed files</summary> 📝 `scratch/bugfix-verification.json` (+29 -170) 📝 `src-tauri/src/commands/storage/images/providers.rs` (+205 -10) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2122 ## Why this change - Illustrator avatar references were reaching the NovelAI image request builder, but V4.5 models were still receiving the legacy Vibe Transfer arrays. Those fields are not the precise/director-reference payload that V4.5 expects, so “Send character & persona avatars as reference images” could silently have no visible effect. ## What changed - Added a NovelAI V4.5 reference-image branch that maps avatar references to `director_reference_images`, `director_reference_descriptions`, `director_reference_information_extracted`, `director_reference_strength_values`, and `director_reference_secondary_strength_values`. - Kept non-4.5 NovelAI V4 models on the existing legacy `reference_image_multiple` / strength / information-extracted arrays. - Added focused Rust request-capture tests for V4.5 reference payloads, V4.5 no-reference payloads, and V4 legacy reference payloads. - Replaced the tracked scratch verification artifact with #2122-specific proof. ## Refactor impact Primary owner: - Rust storage image provider request assembly. Impact areas reviewed: - NovelAI native image generation payload construction. - Illustrator/avatar reference input path at the provider boundary. - V4.5 precise/director reference behavior. - V4 non-4.5 legacy vibe-transfer compatibility. Boundary notes: - The change stays in `src-tauri` provider assembly. No React, engine, shared API, schema, storage format, dependency, auth, or prompt pipeline changes. Pressure points touched: - `src-tauri/src/commands/storage/images/providers.rs` NovelAI request builder and provider tests. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Machine proof: `cargo test --manifest-path src-tauri\Cargo.toml novelai_v45_reference_images_use_director_reference_fields -- --nocapture` failed before the fix because the captured V4.5 request had `director_reference_images` as null while an avatar reference image was supplied. - Machine proof: `cargo test --manifest-path src-tauri\Cargo.toml novelai_ -- --nocapture` passed 5 focused NovelAI tests after the fix. - Baseline: `cargo check --manifest-path src-tauri\Cargo.toml` passed. - Baseline: `pnpm check` passed after installing already-locked dependencies in the isolated worktree. - Proof gate: `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. - Bunny: passed before opening this draft. - Manual limitation: real NovelAI generation/Anlas billing was not exercised because this environment does not have NovelAI credentials. The core request-shape claim is proven with a local request-capture server. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix only; no new discoverable user feature or setting. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence - N/A. This is a backend/provider request-shape fix with local request-capture proof rather than a visible UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed "Send avatars as reference images" functionality for NovelAI V4.5 models, which previously produced no output without error notification. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:32 +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#5461
No description provided.