Refactor: add skip-all checks, fix PIL image loading and cfg_scale parameter, and enable xformers attention
This commit is contained in:
@@ -107,6 +107,14 @@ def main():
|
||||
print(f">> [Error] Task {idx} 缺少 result1_ref_{idx:02d}.pt, 請先執行 step1。")
|
||||
sys.exit(1)
|
||||
|
||||
# 檢查所有 result2_text_*.pt 是否已存在,若全部存在則跳過整個 Step 2
|
||||
all_text_pts_exist = all(os.path.exists(f"result2_text_{idx:02d}.pt") for idx in enabled_ids)
|
||||
if all_text_pts_exist:
|
||||
print(">> [SKIP] 所有 result2_text_*.pt 已存在,跳過 Step 2。")
|
||||
print(f"\n========== [REF2VA STAGE 2] 完成 {len(enabled_ids)}/{len(enabled_ids)} 個任務 (全部跳過) ==========")
|
||||
print(">> 下一步: ref2va_step3.py (DiT 去噪)")
|
||||
return
|
||||
|
||||
torch.cuda.empty_cache()
|
||||
gc.collect()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user