mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-11 16:57:29 +08:00
fix: replace assert with if/raise for pre_filter_count validation
assert is stripped under python -O; use explicit if/raise ValueError so the invariant check is always active.
This commit is contained in:
parent
38e76f7b09
commit
cc9986d268
@ -916,10 +916,11 @@ class LTXVModel(LTXBaseModel):
|
||||
guide_entries = kwargs.get("guide_attention_entries", None)
|
||||
if guide_entries:
|
||||
total_pfc = sum(e["pre_filter_count"] for e in guide_entries)
|
||||
assert total_pfc == len(kf_grid_mask), (
|
||||
f"guide pre_filter_counts ({total_pfc}) != "
|
||||
f"keyframe grid mask length ({len(kf_grid_mask)})"
|
||||
)
|
||||
if total_pfc != len(kf_grid_mask):
|
||||
raise ValueError(
|
||||
f"guide pre_filter_counts ({total_pfc}) != "
|
||||
f"keyframe grid mask length ({len(kf_grid_mask)})"
|
||||
)
|
||||
resolved_entries = []
|
||||
offset = 0
|
||||
for entry in guide_entries:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user