[PR #7696] [MERGED] feat(avatars): make any or all 29 talking-head faces from the avatar #7884

Closed
opened 2026-10-24 04:08:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7696
Author: @SpicyMarinara
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/avatar-28-feelings-generation


📝 Commits (4)

  • e777276 feat(avatars): shared list of the 28 detected feelings and the 23 extra faces
  • ee7b6fc feat(sprites): describe each talking-head face it is asked for
  • 75e7361 feat(avatars): make any or all 29 talking-head faces from the avatar
  • bb2bcf7 fix(sprites): no automatic retry after a timeout, named review cards, whole-grid cell count

📊 Changes

10 files changed (+899 additions, -263 deletions)

View changed files

📝 docs/agents/avatars.md (+1 -1)
📝 e2e/avatar-setup.e2e.ts (+125 -17)
📝 packages/client/src/components/ui/SpriteGenerationModal.tsx (+438 -231)
📝 packages/client/src/features/avatars/generation/AvatarGenerationPanel.tsx (+15 -4)
📝 packages/client/src/localization/locales/en.json (+15 -0)
📝 packages/server/src/routes/sprites.routes.ts (+69 -8)
📝 packages/shared/src/types/avatars.ts (+111 -0)
📝 scripts/regressions/avatar-contract.regression.ts (+40 -0)
📝 scripts/regressions/matched-full-body-requests.regression.mjs (+38 -2)
📝 scripts/regressions/sprite-background.regression.ts (+47 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7691, together with #7692. This PR includes #7692's first commit (the shared feeling list), so merge #7692 first.

Why this change

Mari: "If it supports 28 emotions, we should allow users to provide all 28 of those. And generate those, too. If someone wants less, that's fine, but we should also allow all of them."

#7692 lets the talking head show a face for each of the 23 extra feelings. This PR lets Make faces from the avatar draw them. Before, it could draw at most 16 faces in one sheet, and older GPT Image models silently stopped after 8.

What changed

  • Face maker on the 2D Avatars page (SpriteGenerationModal in face batch mode, used only when expressionChoices is passed):
    • Offers all 29 faces as chips, one row per main feeling, with All faces and Main faces quick picks. The six main faces are chosen by default.
    • Draws the chosen faces in sheets of the chosen grid, one after another, main faces first. Older GPT Image models get one face per request.
    • The existing matched full-body batch runner is generalised for this: auto-retry, cancel keeps finished faces, and pause with Retry on failure.
    • With prompt review on, there is one combined review for the whole run instead of one dialog per sheet.
    • The full-body tab and the animated checkbox are hidden for talking-head faces.
    • Cleanup runs in chunks of 6 cells, so 29 cells don't start 29 background-remover processes at once.
  • Face looks: the talking-head prompt adds a short look for each requested face, for example "fear: eyes very wide with the whites showing, brows raised and pulled together, lips pressed tightly shut". Every look keeps the eyes open and the mouth closed. Labels like approval, realization or desire are too vague for an image model on their own.
  • Character and persona editors are unchanged. Matched full-body generation keeps its behaviour, pinned by the regression.
  • Docs: the Faces from the avatar section. Translations go in a docs-i18n follow-up.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify that All faces with GPT Image draws 29 faces in several pictures, and that each one has open eyes and a closed mouth.
  • Manually verify that Cancel mid-run keeps the faces already made, and that Retry continues after a failed picture.
  • Manually verify that the face maker in the character editor works as before (grids, 16 max, animated, full-body).
  • Manually verify the chips and quick picks at phone width.

Agent-run validation:

  • shared, server, client and e2e tsc; eslint; prettier; check-locales; localization:check
  • regressions: sprite-background, matched-full-body-requests, gpt-image-2-5, pixelize, avatar-contract, avatar-generation
  • Playwright face-maker test on desktop and mobile chromium

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

The Playwright run writes avatar-faces-generator.png to its test output folder.

Summary by CodeRabbit

  • New Features
    • Avatar face generation offers 29 expressions, with options to generate all faces, the six main faces, or a custom selection.
    • Selected faces are generated in sequential batches, with progress shown in the preview. Failed images receive one automatic retry; you can retry again manually, and completed images are retained if generation is canceled.
    • When prompt review is enabled, you can review all batch prompts together before generation.
    • Talking-head prompts describe each requested expression and steer away from closed eyes, open mouths, and visible teeth.
  • Bug Fixes
    • Background cleanup preserves sprite positions when a batch returns fewer results than expected.
    • Talking-head mode hides sprite-type tabs and animated-portrait controls.

🔄 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/7696 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/avatar-28-feelings-generation` --- ### 📝 Commits (4) - [`e777276`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e77727637cb569f104aa0e982e1438d8c626f159) feat(avatars): shared list of the 28 detected feelings and the 23 extra faces - [`ee7b6fc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ee7b6fc5041e20b4057d4f55a98267949d3a2f3e) feat(sprites): describe each talking-head face it is asked for - [`75e7361`](https://github.com/Pasta-Devs/Marinara-Engine/commit/75e7361efa32c45c11c7f4cf75ac0ba6cb06c797) feat(avatars): make any or all 29 talking-head faces from the avatar - [`bb2bcf7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bb2bcf7c57e6e245ab2517652a32fa94b89547f1) fix(sprites): no automatic retry after a timeout, named review cards, whole-grid cell count ### 📊 Changes **10 files changed** (+899 additions, -263 deletions) <details> <summary>View changed files</summary> 📝 `docs/agents/avatars.md` (+1 -1) 📝 `e2e/avatar-setup.e2e.ts` (+125 -17) 📝 `packages/client/src/components/ui/SpriteGenerationModal.tsx` (+438 -231) 📝 `packages/client/src/features/avatars/generation/AvatarGenerationPanel.tsx` (+15 -4) 📝 `packages/client/src/localization/locales/en.json` (+15 -0) 📝 `packages/server/src/routes/sprites.routes.ts` (+69 -8) 📝 `packages/shared/src/types/avatars.ts` (+111 -0) 📝 `scripts/regressions/avatar-contract.regression.ts` (+40 -0) 📝 `scripts/regressions/matched-full-body-requests.regression.mjs` (+38 -2) 📝 `scripts/regressions/sprite-background.regression.ts` (+47 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #7691, together with #7692. This PR includes #7692's first commit (the shared feeling list), so merge #7692 first. ## Why this change Mari: "If it supports 28 emotions, we should allow users to provide all 28 of those. And generate those, too. If someone wants less, that's fine, but we should also allow all of them." #7692 lets the talking head show a face for each of the 23 extra feelings. This PR lets **Make faces from the avatar** draw them. Before, it could draw at most 16 faces in one sheet, and older GPT Image models silently stopped after 8. ## What changed - **Face maker on the 2D Avatars page** (`SpriteGenerationModal` in face batch mode, used only when `expressionChoices` is passed): - Offers all 29 faces as chips, one row per main feeling, with **All faces** and **Main faces** quick picks. The six main faces are chosen by default. - Draws the chosen faces in sheets of the chosen grid, one after another, main faces first. Older GPT Image models get one face per request. - The existing matched full-body batch runner is generalised for this: auto-retry, cancel keeps finished faces, and pause with Retry on failure. - With prompt review on, there is one combined review for the whole run instead of one dialog per sheet. - The full-body tab and the animated checkbox are hidden for talking-head faces. - Cleanup runs in chunks of 6 cells, so 29 cells don't start 29 background-remover processes at once. - **Face looks:** the talking-head prompt adds a short look for each requested face, for example "fear: eyes very wide with the whites showing, brows raised and pulled together, lips pressed tightly shut". Every look keeps the eyes open and the mouth closed. Labels like approval, realization or desire are too vague for an image model on their own. - **Character and persona editors are unchanged.** Matched full-body generation keeps its behaviour, pinned by the regression. - **Docs:** the Faces from the avatar section. Translations go in a docs-i18n follow-up. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify that **All faces** with GPT Image draws 29 faces in several pictures, and that each one has open eyes and a closed mouth. - Manually verify that Cancel mid-run keeps the faces already made, and that Retry continues after a failed picture. - Manually verify that the face maker in the character editor works as before (grids, 16 max, animated, full-body). - Manually verify the chips and quick picks at phone width. Agent-run validation: - shared, server, client and e2e `tsc`; eslint; prettier; `check-locales`; `localization:check` - regressions: sprite-background, matched-full-body-requests, gpt-image-2-5, pixelize, avatar-contract, avatar-generation - Playwright face-maker test on desktop and mobile chromium ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) The Playwright run writes `avatar-faces-generator.png` to its test output folder. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Avatar face generation offers 29 expressions, with options to generate all faces, the six main faces, or a custom selection. * Selected faces are generated in sequential batches, with progress shown in the preview. Failed images receive one automatic retry; you can retry again manually, and completed images are retained if generation is canceled. * When prompt review is enabled, you can review all batch prompts together before generation. * Talking-head prompts describe each requested expression and steer away from closed eyes, open mouths, and visible teeth. * **Bug Fixes** * Background cleanup preserves sprite positions when a batch returns fewer results than expected. * Talking-head mode hides sprite-type tabs and animated-portrait controls. <!-- 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-24 04:08:29 +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#7884
No description provided.