add wan 2.1 text-to-image

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-07-14 13:47:14 -04:00
parent 79d0fb81af
commit 935a4a0aa3
22 changed files with 221 additions and 205 deletions
+5
View File
@@ -125,6 +125,11 @@ def full_vae_decode(latents, model):
if shift_factor:
latents = latents + shift_factor
# check dims
if model.vae.__class__.__name__ in ['AutoencoderKLWan'] and latents.ndim == 4:
latents = latents.unsqueeze(2) # wan is __nhw
# handle quants
if getattr(model.vae, "post_quant_conv", None) is not None:
if getattr(model.vae.post_quant_conv, "bias", None) is not None:
latents = latents.to(model.vae.post_quant_conv.bias.dtype)