From 3040fcd0e7f7c442031ed3807975eb18d3d013ea Mon Sep 17 00:00:00 2001 From: mikehu Date: Thu, 15 Oct 2026 21:15:25 +0800 Subject: [PATCH] [Fixed] first_task_id issue --- ref2va_step4.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ref2va_step4.py b/ref2va_step4.py index 23cd3a9..31fea4f 100644 --- a/ref2va_step4.py +++ b/ref2va_step4.py @@ -111,8 +111,9 @@ def format_audio_for_output(audio_raw, is_dummy=False): def run_pre_dummy_test(pipe, video_vae, audio_vae, fps): - """在正式 Loop 前執行一次 Dummy 測試,固定參考 Task 0 的規格 (權重已常駐 GPU)""" - task0 = TASK_REGISTRY[0] + # 獲取 registry 中的第一個可用 task 作為參考規格 (不假設編號從 0 開始) + first_task_id = next(iter(TASK_REGISTRY)) + task0 = TASK_REGISTRY[first_task_id] target_w = task0.width target_h = task0.height target_frames = task0.num_frames