mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
SDNQ fix VAE x2
This commit is contained in:
@@ -140,8 +140,14 @@ def full_vae_decode(latents, model):
|
||||
if shift_factor:
|
||||
latents = latents + shift_factor
|
||||
|
||||
if getattr(model.vae, "post_quant_conv", None) is not None and "VAE" not in shared.opts.sdnq_quantize_weights:
|
||||
latents = latents.to(next(iter(model.vae.post_quant_conv.parameters())).dtype)
|
||||
if getattr(model.vae, "post_quant_conv", None) is not None:
|
||||
if hasattr(model.vae.post_quant_conv, "bias"):
|
||||
latents = latents.to(model.vae.post_quant_conv.bias.dtype)
|
||||
else:
|
||||
if "VAE" in shared.opts.sdnq_quantize_weights:
|
||||
latents = latents.to(devices.dtype_vae)
|
||||
else:
|
||||
latents = latents.to(next(iter(model.vae.post_quant_conv.parameters())).dtype)
|
||||
else:
|
||||
latents = latents.to(model.vae.dtype)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user