mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-09 13:02:08 +08:00
Support SimpleTuner lycoris lora format for HiDream.
This commit is contained in:
parent
a97f2f850a
commit
f935d42d8e
@ -279,6 +279,13 @@ def model_lora_keys_unet(model, key_map={}):
|
||||
key_map["transformer.{}".format(key_lora)] = k
|
||||
key_map["diffusion_model.{}".format(key_lora)] = k # Old loras
|
||||
|
||||
if isinstance(model, comfy.model_base.HiDream):
|
||||
for k in sdk:
|
||||
if k.startswith("diffusion_model."):
|
||||
if k.endswith(".weight"):
|
||||
key_lora = k[len("diffusion_model."):-len(".weight")].replace(".", "_")
|
||||
key_map["lycoris_{}".format(key_lora)] = k #SimpleTuner lycoris format
|
||||
|
||||
return key_map
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user