Fix Flux2 non-diffusers guidance LoRA conversion#13486
Conversation
|
I checked the extra issue context that was added after this PR went up and widened the fix accordingly. Originally this PR only covered the missing Validation on this branch:
One other note: the current Hub snapshot for |
|
@claude could you do a review as well? |
|
Claude finished @sayakpaul's task in 1m 38s —— View job Review of PR #13486
Review SummaryOverall: Looks good. The changes are correct and well-scoped after the review round with @sayakpaul.
|
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
Thanks for the PR! |
* Fix Flux2 LoRA guidance conversion * Handle expanded Flux2 LoRA block names * Address Flux2 PR review feedback --------- Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Summary
guidance_in.*non-diffusers LoRA keys to the diffusers guidance embedderRoot cause
The Flux2 non-diffusers conversion table handled
time_in.*weights but omittedguidance_in.*, so those keys remained in the original checkpoint and caused conversion to fail. The text-only modular sub-pipeline also has notransformer, so the old loading path fell through to a misleading error instead of rejecting the call directly.Validation
python -m ruff check src/diffusers/loaders/lora_conversion_utils.py src/diffusers/loaders/lora_pipeline.py tests/lora/test_lora_conversion_utils_flux2.pypython -m pytest tests/lora/test_lora_conversion_utils_flux2.py -qFlux2LoraLoaderMixin.lora_state_dict("lovis93/Flux-2-Multi-Angles-LoRA-v2")now returns 340 converted weights and includesguidance_embedderkeysFixes #13484