Skip to content

Commit

Permalink
support SimpleTuner lycoris lora for SD3 (#5340)
Browse files Browse the repository at this point in the history
  • Loading branch information
PsychoLogicAu authored Oct 24, 2024
1 parent 66b0961 commit af8cf79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions comfy/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit af8cf79

Please sign in to comment.