Skip to content

Commit 1c1687a

Browse files
Support HiDream SimpleTuner loras. (Comfy-Org#8318)
1 parent e6609da commit 1c1687a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

comfy/lora.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,9 @@ def model_lora_keys_unet(model, key_map={}):
283283
for k in sdk:
284284
if k.startswith("diffusion_model."):
285285
if k.endswith(".weight"):
286-
key_lora = k[len("diffusion_model."):-len(".weight")].replace(".", "_")
287-
key_map["lycoris_{}".format(key_lora)] = k #SimpleTuner lycoris format
286+
key_lora = k[len("diffusion_model."):-len(".weight")]
287+
key_map["lycoris_{}".format(key_lora.replace(".", "_"))] = k #SimpleTuner lycoris format
288+
key_map["transformer.{}".format(key_lora)] = k #SimpleTuner regular format
288289

289290
if isinstance(model, comfy.model_base.ACEStep):
290291
for k in sdk:

0 commit comments

Comments
 (0)