From 450187c5b30fa48c5b3b820100a5defcb50aaae5 Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Tue, 20 Jan 2026 00:27:44 +0800 Subject: [PATCH] fix(nodes): prevent infinite loop in progress bar calculation --- aiia_echomimic_nodes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aiia_echomimic_nodes.py b/aiia_echomimic_nodes.py index 91a99cc..5981cba 100644 --- a/aiia_echomimic_nodes.py +++ b/aiia_echomimic_nodes.py @@ -439,12 +439,18 @@ class AIIA_EchoMimicSampler: temp_init_frames = 0 while temp_init_frames < video_length: chunk_len = partial_video_length + is_last_chunk = False + if temp_init_frames + chunk_len >= video_length: chunk_len = video_length - temp_init_frames chunk_len = (int((chunk_len - 1) // temporal_compression_ratio * temporal_compression_ratio) + 1 if chunk_len != 1 else 1) + is_last_chunk = True if chunk_len <= 0: break total_chunks += 1 + if is_last_chunk: + break + if temp_init_frames == 0: temp_init_frames += chunk_len else: