Comfy-Org / Comfy-Org/ComfyUI

TAESD preview corrupts midsampling latent if lighttaew2_1 is present

Open
#13,366 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
- [x] This form is obtrusive and unconstructive.

### Expected Behavior

Decoding doesn't encode.

### Actual Behavior

Decoding encodes.

### Steps to Reproduce

- ComfuUI-CLI v1.7.1
- ComfyUI v0.18.2
- [lighttaew2_1.safetensors]()
SHA256: 8666e769f449f2d955651564bcadb0c5e12461b50480e67b7241f32c15f11a19
- I'm using GGUFs if that matters. Probably won't, since it all gets upcast anyway.
- Workflow in the attached image metadata.

### Debug Logs

```
Warning: TAESD previews enabled, but could not find models/vae_approx/lighttaew2_1
```

https://github.com/Comfy-Org/ComfyUI/blob/a2840e75520b7dc40958866b3c4da1345d5cfa9c/latent_preview.py#L95-L105

```
Requested to load WanVAE
0 models unloaded.
Model WanVAE prepared for dynamic VRAM loading. 484MB Staged. 0 patches attached. Force pre-loaded 52 weights: 56 KB.
```

### Other

When generating using Qwen-Image-1 and TAESD preview is enabled, the following message is printed in the terminal…

```
Warning: TAESD previews enabled, but could not find models/vae_approx/lighttaew2_1
```

"Okay, sure," I think, "what's the worst thing that can happen..?"
I locate `lighttaew2_1.safetensors` on Huggingface — seems to be released by the same author that made the accelerator LoRA for QI1 — so that checks out, but they seem to be talking about Wan, which is concerning, but again, this is gonna be used as a decoder, so I'm not risking anything.
I download and drop it in `vae_approx` and ComfyUI doesn't complain anymore. However, now it really leans into the whole…

```
Requested to load WanVAE
0 models unloaded.
Model WanVAE prepared for dynamic VRAM loading. 484MB Staged. 0 patches attached. Force pre-loaded 52 weights: 56 KB.
```

Then for a day I wonder why all my generations come out looking like fartclouds.
I do some testing, suspecting I broke my workflow, but look at these two images produced by the same exact workflow, identically embedded in their metadata…

Image

Image

Isolating environmental factors I find that live preview in this configuration described above corrupts midsampling latent. Something a decoder shall never do: cause any — and especially unintended — writes into the latent memory inexplicably.

I have observed this issue not occurring outside of selecting TAESD as the preview method.
I have observed this issue not occurring outside of `vae_approx/lighttaew2_1.safetensors` being present.
I have observed this issue to occur only when TAESD preview method is selected and `vae_approx/lighttaew2_1.safetensors` is present.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.