The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Support MiniMax-H3 and HiDream O1 loras trained with DiffSynth-Studio / ModelScope (#15662)
Jinyan Yed22a13c66747
diff --git a/comfy/lora.py b/comfy/lora.pyindex 427cf98aa..aa98be152 100644--- a/comfy/lora.py+++ b/comfy/lora.py@@ -304,6 +304,13 @@ def model_lora_keys_unet(model, key_map={}):key_map["lycoris_{}".format(key_lora.replace(".", "_"))] = k #SimpleTuner lycoris formatkey_map["transformer.{}".format(key_lora)] = k #SimpleTuner regular format+ if isinstance(model, comfy.model_base.HiDreamO1):+ for k in sdk:+ if k.startswith("diffusion_model."):+ if k.endswith(".weight"):+ key_lora = k[len("diffusion_model."):-len(".weight")]+ key_map["model.{}".format(key_lora)] = k+if isinstance(model, comfy.model_base.ACEStep):for k in sdk:if k.startswith("diffusion_model.") and k.endswith(".weight"): #Official ACE step lora format@@ -374,6 +381,12 @@ def model_lora_keys_unet(model, key_map={}):key_lora = k[len("diffusion_model."):-len(".weight")]key_map["{}".format(key_lora)] = k+ if isinstance(model, comfy.model_base.MiniMaxH3):+ for k in sdk:+ if k.startswith("diffusion_model.") and k.endswith(".weight"):+ key_lora = k[len("diffusion_model."):-len(".weight")]+ key_map[key_lora] = k+return key_map