mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-04 22:32:32 +08:00
OneTainer ERNIE LoRA support (#13640)
This commit is contained in:
parent
e6e0936128
commit
e9c311b245
@ -342,6 +342,12 @@ def model_lora_keys_unet(model, key_map={}):
|
|||||||
key_map["base_model.model.{}".format(key_lora)] = k # Official base model loras
|
key_map["base_model.model.{}".format(key_lora)] = k # Official base model loras
|
||||||
key_map["lycoris_{}".format(key_lora.replace(".", "_"))] = k # LyCORIS/LoKR format
|
key_map["lycoris_{}".format(key_lora.replace(".", "_"))] = k # LyCORIS/LoKR format
|
||||||
|
|
||||||
|
if isinstance(model, comfy.model_base.ErnieImage):
|
||||||
|
for k in sdk:
|
||||||
|
if k.startswith("diffusion_model.") and k.endswith(".weight"):
|
||||||
|
key_lora = k[len("diffusion_model."):-len(".weight")]
|
||||||
|
key_map["transformer.{}".format(key_lora)] = k
|
||||||
|
|
||||||
return key_map
|
return key_map
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user