diff --git a/apps/worker/video_processing/unified_render_service.py b/apps/worker/video_processing/unified_render_service.py index 35c816fe2..c5d4efb16 100755 --- a/apps/worker/video_processing/unified_render_service.py +++ b/apps/worker/video_processing/unified_render_service.py @@ -2217,7 +2217,7 @@ class UnifiedRenderService: if not bool(cfg.get("gpu_direct_enabled", True)): return False - video_layers = [_lyr for _lyr in layers if l.role not in ("audio",)] + video_layers = [_lyr for _lyr in layers if _lyr.role not in ("audio",)] # 只允许一个视频层,且角色为主层 if len(video_layers) != 1: return False @@ -2272,12 +2272,12 @@ class UnifiedRenderService: from video_processing import gpu_direct_pipeline as gdp cfg = self.plan.config or {} - video_layer = next(_lyr for _lyr in layers if l.role not in ("audio",)) + video_layer = next(_lyr for _lyr in layers if _lyr.role not in ("audio",)) video_clips = [c for c in video_layer.clips if c.clip_type != "audio"] # TTS:把 audio 层的 TTS 片段合并成一个文件给 P4000 tts_merged: Path | None = None - audio_layer = next((_lyr for _lyr in layers if l.role == "audio"), None) + audio_layer = next((_lyr for _lyr in layers if _lyr.role == "audio"), None) if audio_layer: tts_clips = [c for c in audio_layer.clips if (c.config or {}).get("tts") and c.local_path.exists()] if tts_clips: