From eb3227a78bef3cfb2b3662cfcfa4401455bfcadc Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Thu, 22 Jan 2026 01:11:43 +0800 Subject: [PATCH] fix: Reset EMA on speech onset to prevent stale closed-mouth bleed --- libs/Ditto/core/atomic_components/motion_stitch.py | 5 +++++ pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/Ditto/core/atomic_components/motion_stitch.py b/libs/Ditto/core/atomic_components/motion_stitch.py index 7419cca..5275bd5 100644 --- a/libs/Ditto/core/atomic_components/motion_stitch.py +++ b/libs/Ditto/core/atomic_components/motion_stitch.py @@ -587,6 +587,11 @@ class MotionStitch: if not hasattr(self, 'prev_exp_ema'): self.prev_exp_ema = x_d_info["exp"].copy() + # [FIX] Reset EMA on Attack (Speech Onset) to prevent stale "Closed" + # state from bleeding into the new speech expression. + if is_attack: + self.prev_exp_ema = x_d_info["exp"].copy() + x_d_info["exp"] = self.prev_exp_ema * exp_decay + x_d_info["exp"] * (1.0 - exp_decay) self.prev_exp_ema = x_d_info["exp"].copy() diff --git a/pyproject.toml b/pyproject.toml index 51e166f..b673e97 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "aiia" description = "The Ultimate AI Audio/Video toolkit for ComfyUI. Features an enhanced Ditto (with optimizations that outperform official demos and other SOTA talking head models in lip-sync accuracy and natural motion), EchoMimic V3 & FLOAT, VibeVoice & CosyVoice 3.0 (Zero-Shot Voice Cloning), Multi-Role Podcast Generation, and a powerful Media Browser." -version = "1.9.5" +version = "1.9.6" license = {file = "LICENSE"} readme = "README.md" authors = [