From 24b5ddd24b2be1f536acedf1c190c14c87375d41 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Sun, 19 Jul 2026 10:32:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(P1):=20=E4=B8=80=E9=94=AE=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=B0=83=E9=80=9F=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=20-=20speed=E9=85=8D=E7=BD=AE=E5=90=8C=E6=AD=A5=E5=88=B0playba?= =?UTF-8?q?ck=5Fspeed=E9=A1=B6=E7=BA=A7=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:模板的speed/playback_speed只写到clip.config里,但UnifiedRenderService _resolve_clips读的是clip.playback_speed顶级字段,导致调速始终1.0x。 修复: 1. _VirtualClip新增playback_speed字段 2. _apply_template_clip_effects里将模板speed同步到clip.playback_speed --- apps/worker/worker_app/tasks/generation.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/worker/worker_app/tasks/generation.py b/apps/worker/worker_app/tasks/generation.py index d59e61705..906e3694b 100755 --- a/apps/worker/worker_app/tasks/generation.py +++ b/apps/worker/worker_app/tasks/generation.py @@ -174,6 +174,7 @@ class _VirtualClip: start_time: float = 0.0 duration: float = 0.0 transition_effect: str = "cut" + playback_speed: float = 1.0 status: str = "ready" config: dict[str, Any] = field(default_factory=dict) @@ -302,6 +303,16 @@ def _apply_template_clip_effects( existing_config[key] = template_clip_config[key] clip.config = existing_config + # 3. 调速:同步到 clip.playback_speed 顶级字段(渲染引擎读此字段) + template_speed = template_clip_config.get("playback_speed") or template_clip_config.get("speed") + if template_speed: + try: + speed_val = float(template_speed) + if speed_val > 0: + clip.playback_speed = speed_val + except (ValueError, TypeError): + pass + def _build_plan_and_clips_from_task( task_id: str, -- 2.54.0