jbilcke-hf HF Staff commited on
Commit
94c2023
·
verified ·
1 Parent(s): 1a669b9

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -1
handler.py CHANGED
@@ -175,7 +175,9 @@ def initialize_vae_decoder(use_taehv=False, use_trt=False, device="cuda"):
175
  print("Initializing Default VAE Decoder...")
176
  vae_decoder = VAEDecoderWrapper()
177
  try:
178
- vae_state_dict = torch.load('/repository/Wan2.1-T2V-1.3B/Wan2.1_VAE.pth', map_location="cpu")
 
 
179
  decoder_state_dict = {k: v for k, v in vae_state_dict.items() if 'decoder.' in k or 'conv2' in k}
180
  vae_decoder.load_state_dict(decoder_state_dict)
181
  except FileNotFoundError:
 
175
  print("Initializing Default VAE Decoder...")
176
  vae_decoder = VAEDecoderWrapper()
177
  try:
178
+ # I should have called the folder "Wan2.1-T2V-1.3B" instead of "wan2.1"
179
+ #vae_state_dict = torch.load('/repository/Wan2.1-T2V-1.3B/Wan2.1_VAE.pth', map_location="cpu")
180
+ vae_state_dict = torch.load('/repository/wan2.1/Wan2.1_VAE.pth', map_location="cpu")
181
  decoder_state_dict = {k: v for k, v in vae_state_dict.items() if 'decoder.' in k or 'conv2' in k}
182
  vae_decoder.load_state_dict(decoder_state_dict)
183
  except FileNotFoundError: