Open CCpt5 opened 1 day ago
Please add --diffusers
option when merging AI-Toolkit LoRA. Unfortunately auto-detection is not yet implemented.
@CCpt5 in your output above, how can you tell which LoRA merged ok, and which didn't? Are "unused keys" list a bad merge or empty dim and alpha, or KeyError? It looks like they both failed with errors.
@CCpt5 in your output above, how can you tell which LoRA merged ok, and which didn't? Are "unused keys" list a bad merge or empty dim and alpha, or KeyError? It looks like they both failed with errors.
Yea, all of those failed. I did it properly through command line w/ the --diffusers flag as Kohya advised and it worked properly there (sorry don't have a screen capture of that). I was just hoping a toggle to add that flag could be added to the GUI to make it easier.
I think the one caveat at the moment is the LoRA w/ TXT encoder changes won't have those properly merged but there's a warning to that effect indicating they will be in the near future.
@CCpt5 How can we tell if a LoRA is AI-Toolkit or Kohya besides getting an error (or is that the only way)? Do we need to merge these LoRAs separately if we have both kinds, using the --diffusers flag only with the AI-Toolkit LoRAs?
When I tried yesterday, the sd3-flux.1 branch, there was a checkbox for diffusers lora which added --diffusers to the command. I managed to merge ai-toolkit Loras into a unet with it. But it still doesn't work for merging Loras together.
When I tried yesterday, the sd3-flux.1 branch, there was a checkbox for diffusers lora which added --diffusers to the command. I managed to merge ai-toolkit Loras into a unet with it. But it still doesn't work for merging Loras together.
Ahh interesting! I'll double check - maybe I didn't update as I should have.
Not sure on merging LoRA tbh - I haven't tried that to this point.
If there are a lot of "unused keys," does that mean it is AI-Toolkit format?
If there are a lot of "unused keys," does that mean it is AI-Toolkit format?
It may, or it could be that the TXT encoder(s) were trained as well for those LoRA. The console error should list that though if that's the cause.
When it said it had "unused keys" I added the --diffusers and it looks like it searched for, found, and merged the keys properly. One of my LoRAs did not have any "unused keys" so was probably already in Kohya format, and I didn't need to use the --diffusers.
Hello,
Currently the featuring to merge Flux LoRA into the base model does not function properly with LoRA trained by Ostris' AI-Toolkit. This appears to be due to a difference in the way the keys are labeled/named. The tool does seem able to merge AI-Toolkit LoRA into other Kohya/AI-Toolkit trained LoRA, but merging into the base model fails at the moment.
Thanks for any assistance!
Console example: