Skip to content

Commit 154885d

Browse files
Support the omnigen2 umo lora. (comfyanonymous#9886)
1 parent 19a52b3 commit 154885d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

comfy/lora.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ def model_lora_keys_unet(model, key_map={}):
297297
key_lora = k[len("diffusion_model."):-len(".weight")]
298298
key_map["{}".format(key_lora)] = k
299299

300+
if isinstance(model, comfy.model_base.Omnigen2):
301+
for k in sdk:
302+
if k.startswith("diffusion_model.") and k.endswith(".weight"):
303+
key_lora = k[len("diffusion_model."):-len(".weight")]
304+
key_map["{}".format(key_lora)] = k
305+
300306
if isinstance(model, comfy.model_base.QwenImage):
301307
for k in sdk:
302308
if k.startswith("diffusion_model.") and k.endswith(".weight"): #QwenImage lora format

0 commit comments

Comments
 (0)