Emotion Base Generation uses wrong reference #267

Closed
opened 2026-09-02 16:05:19 +02:00 by bjoern · 1 comment
Owner

When generating the base image for the emotions, the character reference is set to the the default main reference base, not the outfit reference base

Received HTTP response headers after 12319.6674ms - 200

info: System.Net.Http.HttpClient.NovelAI.LogicalHandler[101]

   End processing HTTP request after 12319.8017ms - 200

info: Kagura.Infrastructure.Settings.NovelAiGateway[0]

   Generation: nai-diffusion-5-full, 1088x960, 2 subjects, transparent.

info: Kagura.Infrastructure.Generation.ActivityQueue[0]

   Queue activity character-outfit-sheet "Maya — Slingshot bikini — sheet" succeeded in 00:00:12.3866628.

info: System.Net.Http.HttpClient.NovelAI.LogicalHandler[100]

   Start processing HTTP request POST https://image.novelai.net/ai/generate-image

info: System.Net.Http.HttpClient.NovelAI.ClientHandler[100]

   Sending HTTP request POST https://image.novelai.net/ai/generate-image

info: System.Net.Http.HttpClient.NovelAI.ClientHandler[101]

   Received HTTP response headers after 11857.3468ms - 200

info: System.Net.Http.HttpClient.NovelAI.LogicalHandler[101]

   End processing HTTP request after 11857.478ms - 200

info: Kagura.Infrastructure.Settings.NovelAiGateway[0]

   Generation: nai-diffusion-4-5-full, 832x1216, 1 subject, transparent.

info: Kagura.Infrastructure.Generation.ActivityQueue[0]

   Queue activity character-outfit-sprite "Maya — Slingshot bikini — sprite" succeeded in 00:00:11.9599425.


Expectation

  • Base Character sheet uses at most only a style reference
  • Base Outfit sheet uses the Base Character Sheet as a style+char reference
  • Base Emotion image uses Base Outfit sheet as style+char reference
  • Emotion variant uses i2i on the Base Emotion image and Base Outfit sheet as style+char reference
When generating the base image for the emotions, the character reference is set to the the default main reference base, not the outfit reference base ``` Received HTTP response headers after 12319.6674ms - 200 info: System.Net.Http.HttpClient.NovelAI.LogicalHandler[101] End processing HTTP request after 12319.8017ms - 200 info: Kagura.Infrastructure.Settings.NovelAiGateway[0] Generation: nai-diffusion-5-full, 1088x960, 2 subjects, transparent. info: Kagura.Infrastructure.Generation.ActivityQueue[0] Queue activity character-outfit-sheet "Maya — Slingshot bikini — sheet" succeeded in 00:00:12.3866628. info: System.Net.Http.HttpClient.NovelAI.LogicalHandler[100] Start processing HTTP request POST https://image.novelai.net/ai/generate-image info: System.Net.Http.HttpClient.NovelAI.ClientHandler[100] Sending HTTP request POST https://image.novelai.net/ai/generate-image info: System.Net.Http.HttpClient.NovelAI.ClientHandler[101] Received HTTP response headers after 11857.3468ms - 200 info: System.Net.Http.HttpClient.NovelAI.LogicalHandler[101] End processing HTTP request after 11857.478ms - 200 info: Kagura.Infrastructure.Settings.NovelAiGateway[0] Generation: nai-diffusion-4-5-full, 832x1216, 1 subject, transparent. info: Kagura.Infrastructure.Generation.ActivityQueue[0] Queue activity character-outfit-sprite "Maya — Slingshot bikini — sprite" succeeded in 00:00:11.9599425. ``` Expectation - Base Character sheet uses at most only a style reference - Base Outfit sheet uses the Base Character Sheet as a style+char reference - Base Emotion image uses Base Outfit sheet as style+char reference - Emotion variant uses i2i on the Base Emotion image and Base Outfit sheet as style+char reference
Member

Traced all four expectation bullets against current main (750ed05), code-verified:

1. Base Character sheet — style only ✅
CharacterImageGenerator → ForCharacterSheet, at most the project style image. Matches.

2. Base Outfit sheet ← Base Character Sheet as char&style ✗ — blocked by an accepted ADR, not an oversight
ADR 0067 (revised): "The sheet is never reference-carrying — a positioned sheet plus a reference hits ADR 0066's composed guard on every model." The sheet's two views are free-form positioned (positions pin D5), references pin 4.5 — no model does both. Identity currently reaches the outfit sheet via tags only. Changing this means an ADR revision (e.g. an unpositioned 4.5 sheet variant — which ADR 0066 rejected as "a sheet collapsing into one figure") or accepting the current design.

3. The emotion base (the outfit sprite the Expressions tab inpaints) ← outfit sheet as char&style ✗ — this is the report's core bug, and it's a clean fix
OutfitImageGenerator.RunSpriteAsync carries the character's base sheet as lineage under the likeness flag — the outfit's own sheet, which ADR 0067 itself names "the durable identity reference," never rides. The CG cast pick already prefers SheetImageFileName ?? ImageFileName; the sprite lineage should mirror that: outfit sheet when generated, character base as the legacy fallback. Keeps #265's sheet/sprite independence intact for outfits without a sheet yet.

4. Emotion variants ← outfit sheet ref on the infill ✗ — deliberately absent; needs a live probe first
The ADR 0042 post-mortem recorded that a character director entry on the infill action made the server ignore the mask; ADR 0043 codified "no director entry rides an infill." Adding the outfit sheet there is worth a probe (the 0042 incident was a lone character entry; a character&style entry may behave differently), but it shouldn't ship unprobed — same risk class that produced the 0042 revert.

Diagnosis note: the metadata log from #266 already distinguishes these — the sprite line in the issue's log shows no likeness= payload at all, so that run had UseBaseImageReference off; the wrong-reference behavior lives in the likeness=characters/<id>/base.png runs.

Proposed scope: fix (3) now — small, mirrors the CG pick, one lineage choice site. (2) and (4) are design decisions to make explicitly, not side effects of this fix.

Traced all four expectation bullets against current main (750ed05), code-verified: **1. Base Character sheet — style only ✅** `CharacterImageGenerator` → `ForCharacterSheet`, at most the project style image. Matches. **2. Base Outfit sheet ← Base Character Sheet as char&style ✗ — blocked by an accepted ADR, not an oversight** ADR 0067 (revised): *"The sheet is never reference-carrying — a positioned sheet plus a reference hits ADR 0066's composed guard on every model."* The sheet's two views are free-form positioned (positions pin D5), references pin 4.5 — no model does both. Identity currently reaches the outfit sheet via tags only. Changing this means an ADR revision (e.g. an unpositioned 4.5 sheet variant — which ADR 0066 rejected as "a sheet collapsing into one figure") or accepting the current design. **3. The emotion base (the outfit sprite the Expressions tab inpaints) ← outfit sheet as char&style ✗ — this is the report's core bug, and it's a clean fix** `OutfitImageGenerator.RunSpriteAsync` carries the *character's* base sheet as lineage under the likeness flag — the outfit's own sheet, which ADR 0067 itself names *"the durable identity reference,"* never rides. The CG cast pick already prefers `SheetImageFileName ?? ImageFileName`; the sprite lineage should mirror that: outfit sheet when generated, character base as the legacy fallback. Keeps #265's sheet/sprite independence intact for outfits without a sheet yet. **4. Emotion variants ← outfit sheet ref on the infill ✗ — deliberately absent; needs a live probe first** The ADR 0042 post-mortem recorded that a character director entry on the infill action made the server **ignore the mask**; ADR 0043 codified "no director entry rides an infill." Adding the outfit sheet there is worth a probe (the 0042 incident was a lone `character` entry; a `character&style` entry may behave differently), but it shouldn't ship unprobed — same risk class that produced the 0042 revert. **Diagnosis note:** the metadata log from #266 already distinguishes these — the sprite line in the issue's log shows no `likeness=` payload at all, so that run had `UseBaseImageReference` off; the wrong-reference behavior lives in the `likeness=characters/<id>/base.png` runs. **Proposed scope:** fix (3) now — small, mirrors the CG pick, one lineage choice site. (2) and (4) are design decisions to make explicitly, not side effects of this fix.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
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
TeamAI/Kagura#267
No description provided.