Add key check before dcae key mapping to prevent breaking existing weights; Added both weight addresses to README.md

This commit is contained in:
Zhaolun Zou
2024-12-17 13:34:10 +08:00
parent d96f63d5ed
commit 99bff66e39
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -34,8 +34,9 @@ class EXVAE(comfy.sd.VAE):
model = MoVQ(model_conf)
elif model_conf["type"] == "DCAE":
from .models.dcae import DCAE
from .models import dcae_key_mapping
sd = dcae_key_mapping.convert_sd(sd)
if 'decoder.project_out.op_list.0.bias' in sd:
from .models import dcae_key_mapping
sd = dcae_key_mapping.convert_sd(sd)
model = DCAE(**model_conf)
else:
raise NotImplementedError(f"Unknown VAE type '{model_conf['type']}'")