Skip to content

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 SimpleTuner lycoris lora for SD3 (#5340)

PsychoLogicAuaf8cf79a2dbd
diff --git a/comfy/lora.py b/comfy/lora.py
index 81cd1696e..b745ca4d5 100644
--- a/comfy/lora.py
+++ b/comfy/lora.py
@@ -317,6 +317,10 @@ def model_lora_keys_unet(model, key_map={}):
key_lora = "lora_transformer_{}".format(k[:-len(".weight")].replace(".", "_")) #OneTrainer lora
key_map[key_lora] = to
+ key_lora = "lycoris_{}".format(k[:-len(".weight")].replace(".", "_")) #simpletuner lycoris format
+ key_map[key_lora] = to
+
+
if isinstance(model, comfy.model_base.AuraFlow): #Diffusers lora AuraFlow
diffusers_keys = comfy.utils.auraflow_to_diffusers(model.model_config.unet_config, output_prefix="diffusion_model.")
for k in diffusers_keys: