chore: update output filename format to 2-digit padding (%02d) for all ref2va steps
This commit is contained in:
+6
-6
@@ -15,7 +15,7 @@ processor/tokenizer (幾 MB, 非模型權重)。
|
||||
不載入 DiT / video VAE / audio VAE。
|
||||
|
||||
每個任務 (全部 N 個視頻在這次載入中一次跑完, text encoder 只載入一次):
|
||||
1. 讀 step1 落盤的 result1_ref_{idx}.pt → ref_blocks (含 prepared_image)
|
||||
1. 讀 step1 落盤的 result1_ref_{idx:02d}.pt → ref_blocks (含 prepared_image)
|
||||
2. 直接呼叫 pipeline 內建的 MiniMaxH3Unit_PromptEmbedder.process
|
||||
(ref2va 主路徑:
|
||||
preprocess_ref_blocks → image_token_counts(processor, prepared_images)
|
||||
@@ -25,7 +25,7 @@ processor/tokenizer (幾 MB, 非模型權重)。
|
||||
|
||||
⚠️ 不能走 __call__ 的 text_embedding 快速路徑 (那會回全 1 的 tags,
|
||||
DiT 的 ADALN 靠 0/1 混合 tags 區分 text/vision token)。
|
||||
3. 落盤 result2_text_{idx}.pt: {hidden, text_token_tags}
|
||||
3. 落盤 result2_text_{idx:02d}.pt: {hidden, text_token_tags}
|
||||
|
||||
單權重策略: 任一時刻 DRAM/VRAM 只有 text encoder 一個權重。
|
||||
下一階段: ref2va_step3.py (DiT 去噪, replay 本步的 hidden + tags)
|
||||
@@ -91,8 +91,8 @@ def main():
|
||||
|
||||
# 上游檢查
|
||||
for idx in enabled_ids:
|
||||
if not os.path.exists(f"result1_ref_{idx}.pt"):
|
||||
print(f">> [Error] Task {idx} 缺少 result1_ref_{idx}.pt, 請先執行 step1。")
|
||||
if not os.path.exists(f"result1_ref_{idx:02d}.pt"):
|
||||
print(f">> [Error] Task {idx} 缺少 result1_ref_{idx:02d}.pt, 請先執行 step1。")
|
||||
sys.exit(1)
|
||||
|
||||
torch.cuda.empty_cache()
|
||||
@@ -161,7 +161,7 @@ def main():
|
||||
print(f"\n[STOP] 偵測到 .stop。進度 {last_completed_idx} 已存至 .restart。")
|
||||
return
|
||||
|
||||
save_name = f"result2_text_{idx}.pt"
|
||||
save_name = f"result2_text_{idx:02d}.pt"
|
||||
if os.path.exists(save_name):
|
||||
print(f">> [SKIP] Task {idx} 已有 {save_name}。")
|
||||
last_completed_idx = idx
|
||||
@@ -173,7 +173,7 @@ def main():
|
||||
print(f">> [Error] Task {idx} prompt 為空。")
|
||||
sys.exit(1)
|
||||
|
||||
data = torch.load(f"result1_ref_{idx}.pt", weights_only=False)
|
||||
data = torch.load(f"result1_ref_{idx:02d}.pt", weights_only=False)
|
||||
ref_blocks = data["ref_blocks"]
|
||||
print(f"\n>> [Task {idx}] 編碼 prompt ({len(ref_blocks)} 個 ref blocks)...")
|
||||
print(f" Prompt: {prompt[:60]}...")
|
||||
|
||||
Reference in New Issue
Block a user