Add key check before dcae key mapping to prevent breaking existing weights; Added both weight addresses to README.md
This commit is contained in:
+3
-2
@@ -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']}'")
|
||||
|
||||
Reference in New Issue
Block a user