[Bug]: OT Chroma LoRA can not be used with Forge WebUI
What happened?
Forge WebUI will give a LoRA version mismatch error when loading Chroma LoRA created with OT.
What did you expect would happen?
That it would be possible to load & use OT Chroma LoRA normally with Forge like it is possible with LoRA from other training software like Diffusion Pipe.
I already know this is related to how the LoRA keys are named:
OT Output, can not be loaded:
lora_transformer_single_transformer_blocks_0_attn_to_k.alpha
lora_transformer_single_transformer_blocks_0_attn_to_k.lora_down.weight
lora_transformer_single_transformer_blocks_0_attn_to_k.lora_up.weight
lora_transformer_single_transformer_blocks_0_attn_to_q.alpha
lora_transformer_single_transformer_blocks_0_attn_to_q.lora_down.weight
lora_transformer_single_transformer_blocks_0_attn_to_q.lora_up.weight
lora_transformer_single_transformer_blocks_0_attn_to_v.alpha
lora_transformer_single_transformer_blocks_0_attn_to_v.lora_down.weight
lora_transformer_single_transformer_blocks_0_attn_to_v.lora_up.weight
lora_transformer_single_transformer_blocks_1_attn_to_k.alpha
While this can be loaded without issues:
diffusion_model.single_blocks.0.linear1.lora_A.weight
diffusion_model.single_blocks.0.linear1.lora_B.weight
diffusion_model.single_blocks.0.linear2.lora_A.weight
diffusion_model.single_blocks.0.linear2.lora_B.weight
diffusion_model.single_blocks.1.linear1.lora_A.weight
diffusion_model.single_blocks.1.linear1.lora_B.weight
diffusion_model.single_blocks.1.linear2.lora_A.weight
diffusion_model.single_blocks.1.linear2.lora_B.weight
diffusion_model.single_blocks.2.linear1.lora_A.weight
diffusion_model.single_blocks.2.linear1.lora_B.weigh
diffusion_model.single_blocks.2.linear2.lora_A.weight
diffusion_model.single_blocks.2.linear2.lora_B.weight
diffusion_model.single_blocks.3.linear1.lora_A.weight
And this one is also accepted:
lora_unet_single_blocks_0_linear1.alpha
lora_unet_single_blocks_0_linear1.lora_down.weight
lora_unet_single_blocks_0_linear1.lora_up.weight
lora_unet_single_blocks_0_linear2.alpha
lora_unet_single_blocks_0_linear2.lora_down.weight
lora_unet_single_blocks_0_linear2.lora_up.weight
lora_unet_single_blocks_1_linear1.alpha
lora_unet_single_blocks_1_linear1.lora_down.weight
lora_unet_single_blocks_1_linear1.lora_up.weight
lora_unet_single_blocks_1_linear2.alpha
Example files for working Chroma LoRAs with two different key name formats: https://huggingface.co/Clybius/chroma-loras/tree/main?show_file_info=MSPaint-7-11-25-ChromaV43.safetensors https://huggingface.co/silveroxides/Chroma-LoRA-Experiments/tree/main?show_file_info=PhotoTouch_Chroma.safetensors
So my suggestion would be to fix this make OneTrainer output LoRA keys in one of the already established formats.
If for whatever technical reason that is not easily possible I suggest to offer a small script to convert “OneTrainer”-Format into one of the accepted formats as a workaround that may require less effort.
(Side-note to OT devs: I Know you are aware of this, but I thought opening the issue would be a good idea, to bundle the info that I already have and give others a chance to look at it, too.)
Relevant log output
Generate and upload debug_report.log
No response
Editing Forge code fixed it. https://github.com/Haoming02/sd-webui-forge-classic/commit/3650f33bdea2d3e27e3913fc40bc5b4504b1d902