mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#8036
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7974
Author: @SpicyMarinara
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7962-avatar-blink-talk-threshold📝 Commits (2)
0c5dcb5fix(avatars): blink and talk pictures work on dark skin and hide the whole open eye (#7962)fa1d8edMerge branch 'staging' into fix/7962-avatar-blink-talk-threshold📊 Changes
2 files changed (+156 additions, -36 deletions)
View changed files
📝
packages/server/src/services/avatars/generation/variant-composite.ts(+97 -36)📝
scripts/regressions/avatar-variant-composite.regression.ts(+59 -0)📄 Description
Linked issue
Closes #7962
Why this change
2D Avatars blink and talk pictures failed depending on the character's colours (#7962):
What changed
All in
packages/server/src/services/avatars/generation/variant-composite.ts:Detection uses perceptual colour difference. Changes are measured as CIE76 Lab distance: a change counts from ΔE 10, and the main group must average 12. A dark mouth on dark skin now counts the same way one on light skin does.
Compression noise is still refused. If the main group averages under ΔE 30, its change must be at least 0.6 of how much the face itself varies under it. JPEG ringing and chroma bleed sit on the face's own lines and edges and fall below that, while real edits change a spot by more than the face varies there. Groups smaller than longSide²/10 000 pixels (26 on a 512-pixel face) are scraps of redrawn lines, not an eye or a mouth.
The whole eye or mouth comes from the model. Every non-outline pixel inside each chosen group's own ellipse (through the corners of its box, plus the feather) is taken from the model's picture. An iris, an eye white or teeth that differ only a little from the face can no longer show through. Outside the generous ellipse the face stays byte for byte, and its alpha is kept everywhere, as before.
Alignment treats padding as white. Fit samples that fall past the edge of the model's picture now count as the white padding models add, instead of a full mismatch. Before this, a picture the model shifted and padded with white could be fitted at the wrong scale, which offset the eye or mouth by a couple of pixels.
New regression case.
scripts/regressions/avatar-variant-composite.regression.tscovers the issue's model-independent repro:The old compositor fails both the talk check (it throws) and the blink check (348 open-eye pixels left).
Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run checks:
node ./scripts/run-regressions.mjs --filterforavatar-variant-composite,image-edit-referenceandavatar-generation.pnpm check(typecheck and lint), CodeRabbit and other local review tools.Manual verification notes
Known limits (none of these are new failures):
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/agents/avatars.md§ Blink and talk pictures already describes this behaviour without colour thresholds ("only the eyes … or the mouth … is taken from it"), so I made no docs change.UI evidence (if applicable)
This is a server-side picture change with no UI change. Before/after crops from the synthetic harness:
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.