Skip to content

Fix: shape-safe TeaCache residuals + auto-reset + updated LTXBaseModel for ComfyUI latest releases#182

Open
elsung wants to merge 1 commit intowelltop-cn:mainfrom
elsung:main
Open

Fix: shape-safe TeaCache residuals + auto-reset + updated LTXBaseModel for ComfyUI latest releases#182
elsung wants to merge 1 commit intowelltop-cn:mainfrom
elsung:main

Conversation

@elsung
Copy link

@elsung elsung commented Jan 25, 2026

This update fixes a common TeaCache crash and makes the node work with the newest ComfyUI changes.

✅ What was broken

TeaCache sometimes crashed with WAN models because it tried to reuse old cached tensors even when the model shape changed.
This caused errors like:

Size of tensor a must match tensor b

✅ What this PR fixes

Stops crashes: TeaCache now checks the tensor shape before using cached data.

Auto-reset: Cache resets itself when shape changes or at step 0.

Safe residuals: Only adds cached data if the size matches.

More stable video runs: No more random failures when FPS or resolution changes.

LTXBaseModel updated (line 12 + line ~736): Adjusted imports and calls so TeaCache works with the latest ComfyUI updates.

✅ Why this helps

TeaCache stays fast but doesn’t break anymore, even with dynamic settings like different sizes, frames, or batch changes.

@horsten
Copy link

horsten commented Feb 7, 2026

It's broken again, because of more changes to support LTXV-2. The best fix for now is probably to disable LTXV support entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants