Support diffusers-format LoRAs for Anima - #14182
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds support for LoRA weight mapping on Anima models (MMDiT-based architectures). A new utility function 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Anima already has a standard lora format, I don't see any reason to support another. |
The best answer I can give you is: consistency. Diffusers keeps using their own layer names, and so far Comfy has supported them for all models. Please have a look at the code before making a decision - it's the same code as for z image and other models. I can't argue that it is a great idea that diffusers changes layer names for their implementations - but they do. And supporting their keys for some models but not for others creates difficulties for the community. |
|
could you decide this please? |
|
Decision is mainly along these lines:
In this case you did the work so it wouldn't take much effort to support but I don't see any public loras in this format so I'll keep this open until I do. |
|
I have trained some loras but since comfy does not supports it so I can't publish it. Can you add support? |
|
I created a simple patch custom node for Anima support based on this PR. Simply install and either types of LoRA will work in ComfyUI. Check it out here: https://github.com/FuouM/ComfyUI-Anima-Diffusers-LoRA |
|
Disregard. My apologies. I didn't properly confirm things. Got mixed up when switching OS. AFAIK the LoKrs and LoHas were being handled by this PR and above custom node. |
I have added LoKr and LoHa support to the custom node in the latest commit. I don't have real LoKr and LoHa created by OneTrainer on hand so I can't fully verify, but my OFTv2 worked as usual. Thanks! |
|
Because of inconsistent support by inference tools and lack of standardization, OneTrainer now implements saving various LoRA formats (diffuser-, kohya, and comfy formats). I'll therefore stop submitting PRs such as this one, that add loading diffusers LoRAs into comfy, because people can just save in another format. |
diffusershave recently merged their Anima PR: huggingface/diffusers#13732This PR adds support for diffusers LoRAs with their keys. The template for this was the existing diffusers-LoRA support for Z-Image.
It was created with AI assistance, but manually checked.
Tested with a trained diffusers LoRA: all keys load with no unmatched keys, and it
applies correctly end-to-end on anima-preview3-base.