Fix LTXAVTEModel memory leak warning on VAE decode
Delete model/positive/negative references before calling vae.decode() so ComfyUI's model manager can unload the diffusion model and text encoder cleanly. Previously they stayed live as function parameters, causing the circular-reference warning. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
0e17316639
commit
b4c6e1b264
@@ -1479,6 +1479,11 @@ class FunPackLTXAVSceneChainSampler:
|
||||
want_latent = self._output_connected(prompt, unique_id, 0)
|
||||
want_image = self._output_connected(prompt, unique_id, 1)
|
||||
|
||||
# Release generation-side references so ComfyUI can unload the diffusion
|
||||
# model and text encoder before VAE decode runs. Without this, they stay
|
||||
# live as function parameters and trigger the "memory leak" warning.
|
||||
del model, positive, negative
|
||||
|
||||
images = None
|
||||
if boundary_entries:
|
||||
if want_image:
|
||||
|
||||
Reference in New Issue
Block a user