diff --git a/aiia_ditto_nodes.py b/aiia_ditto_nodes.py index 5b2a966..8da4e47 100644 --- a/aiia_ditto_nodes.py +++ b/aiia_ditto_nodes.py @@ -754,7 +754,7 @@ class AIIA_DittoSampler: # Only applied when alpha < 1.0. idle_amp = 4.5 - DECAY_FRAMES = 25 # ~1.0s + DECAY_FRAMES = 50 # [v1.9.117] Sync with Core warping (80 frames) for seamless handover for i in range(num_frames): alpha = float(dataset_alpha[i]) diff --git a/libs/Ditto/core/atomic_components/audio2motion.py b/libs/Ditto/core/atomic_components/audio2motion.py index 43ee777..b02c7d0 100644 --- a/libs/Ditto/core/atomic_components/audio2motion.py +++ b/libs/Ditto/core/atomic_components/audio2motion.py @@ -259,7 +259,7 @@ class Audio2Motion: # Apply decaying warp to the new sequence # We want to return to the model's path over ~50 frames (v1.9.107: longer decay) - decay_len = 50 + decay_len = 80 warp_len = min(decay_len, pred_kp_seq.shape[1]) weights = np.linspace(1.0, 0.0, warp_len).reshape(1, -1, 1) diff --git a/libs/Ditto/core/atomic_components/motion_stitch.py b/libs/Ditto/core/atomic_components/motion_stitch.py index 21e44c0..53b7927 100644 --- a/libs/Ditto/core/atomic_components/motion_stitch.py +++ b/libs/Ditto/core/atomic_components/motion_stitch.py @@ -681,14 +681,19 @@ class MotionStitch: exp_reshaped[:, _squint_fix] = src_reshaped[:, _squint_fix] x_d_info["exp"] = exp_reshaped.reshape(1, -1) - # [v1.9.116] DIAGNOSTIC: Temporarily disabled mouth bias to trace facial mutation - # bias_alpha = kwargs.get("vad_alpha", 0.0) - # lower_lip = [17, 19, 20] - # corners = [7, 8] - # exp_reshaped = x_d_info["exp"].reshape(-1, 21, 3) - # exp_reshaped[:, lower_lip, 1] += 0.05 * bias_alpha - # exp_reshaped[:, corners, 1] += 0.015 * bias_alpha - # x_d_info["exp"] = exp_reshaped.reshape(1, -1) + # [v1.9.117] Lite Mouth Opening Bias (Applied BEFORE EMA for temporal smoothing) + # We use a 60% strength (+0.03) compared to v1.9.112 to avoid facial mutation. + bias_alpha = kwargs.get("vad_alpha", 0.0) + lower_lip = [17, 19, 20] + corners = [7, 8] + + # Point to spatial indexing: exp is (1, 21, 3) + exp_reshaped = x_d_info["exp"].reshape(-1, 21, 3) + # Center lower lip gets lite bias (+0.03) + exp_reshaped[:, lower_lip, 1] += 0.03 * bias_alpha + # Corners get micro bias (+0.01) for minimal structural support + exp_reshaped[:, corners, 1] += 0.01 * bias_alpha + x_d_info["exp"] = exp_reshaped.reshape(1, -1) # [FIX] Expression Temporal Smoothing (EMA) # Prevents inhumanly fast mouth open/close cycles by adding inertia. diff --git a/pyproject.toml b/pyproject.toml index 49b0465..3ca9ffd 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.116" +version = "1.9.117" license = {file = "LICENSE"} readme = "README.md" authors = [