Skip to content

Commit

Permalink
Fix VAEEncode with taesd3.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 16, 2024
1 parent 04e8798 commit 746a041
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comfy/sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def __init__(self, sd=None, device=None, config=None, dtype=None):
encoder_config={'target': "comfy.ldm.modules.diffusionmodules.model.Encoder", 'params': encoder_config},
decoder_config={'target': "comfy.ldm.modules.temporal_ae.VideoDecoder", 'params': decoder_config})
elif "taesd_decoder.1.weight" in sd:
self.first_stage_model = comfy.taesd.taesd.TAESD(latent_channels=sd["taesd_decoder.1.weight"].shape[1])
self.latent_channels = sd["taesd_decoder.1.weight"].shape[1]
self.first_stage_model = comfy.taesd.taesd.TAESD(latent_channels=self.latent_channels)
elif "vquantizer.codebook.weight" in sd: #VQGan: stage a of stable cascade
self.first_stage_model = StageA()
self.downscale_ratio = 4
Expand Down

0 comments on commit 746a041

Please sign in to comment.