Skip to content

[pull] master from comfyanonymous:master#346

Merged
pull[bot] merged 4 commits intocode:masterfrom
Comfy-Org:master
Oct 13, 2025
Merged

[pull] master from comfyanonymous:master#346
pull[bot] merged 4 commits intocode:masterfrom
Comfy-Org:master

Conversation

@pull
Copy link

@pull pull bot commented Oct 13, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

comfyanonymous and others added 4 commits October 13, 2025 14:57
Same change pattern as 7e8dd27
applied to WAN2.2

If this suffers an exception (such as a VRAM oom) it will leave the
encode() and decode() methods which skips the cleanup of the WAN
feature cache. The comfy node cache then ultimately keeps a reference
this object which is in turn reffing large tensors from the failed
execution.

The feature cache is currently setup at a class variable on the
encoder/decoder however, the encode and decode functions always clear
it on both entry and exit of normal execution.

Its likely the design intent is this is usable as a streaming encoder
where the input comes in batches, however the functions as they are
today don't support that.

So simplify by bringing the cache back to local variable, so that if
it does VRAM OOM the cache itself is properly garbage when the
encode()/decode() functions dissappear from the stack.
@pull pull bot locked and limited conversation to collaborators Oct 13, 2025
@pull pull bot added the ⤵️ pull label Oct 13, 2025
@pull pull bot merged commit 3dfdcf6 into code:master Oct 13, 2025
10 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants