-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flux merge tool does not properly handle LoRA keys from AI-Toolkit when merging w/ Flux.dev model - All keys "Unused" / Unchanged model file outputted #1612
Comments
Please add |
@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. |
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? |
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:
The text was updated successfully, but these errors were encountered: