[LoRA] accept fal-kontext LoRAs whose embedder keys lack the base_model.model. prefix - #2
Open
christopher5106 wants to merge 6 commits into
Open
christopher5106 wants to merge 6 commits into
christopher5106 wants to merge 6 commits into
Conversation
…ase_model.model. prefix Some fal-kontext LoRAs store time_in / vector_in / txt_in / img_in / guidance_in without the `base_model.model.` prefix the block keys use, so `_convert_fal_kontext_lora_to_diffusers` left them in `original_state_dict` and raised "`original_state_dict` should be empty at this point". Map them to their diffusers names before that check. Rebuilt from 02abf7eb1 (2026-04-15) without its Kohya Flux.2 hunks, which upstream now covers with `_convert_kohya_flux2_lora_to_diffusers`.
diffusers does not unit-test private converter functions against third-party checkpoint layouts; the fix is reproducible through FluxPipeline.lora_state_dict (see the linked issue).
…ce#14897) * Fix Cosmos 3 Transfer SeaCache indicators * Clarify SeaCache indicator guidance; tests refactor --------- Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* add return types * add return blocks * style * modular pipelines * add a test to validate * feedback - skip deprecated stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream: huggingface#14918 (open), fixing issue huggingface#14917.
Problem:
_convert_fal_kontext_lora_to_diffusersexpects every key to carry thebase_model.model.prefix. Some fal FLUX.1 Kontext LoRAs store the global embedder keys (time_in,vector_in,txt_in,img_in,guidance_in) without it, so they are left over and loading fails on "original_state_dictshould be empty".Change:
lora_conversion_utils.pyaccepts those embedder keys with or without the prefix.Test: the branch's second commit drops the unit test, since upstream does not test private converters. The reproduction is in huggingface#14917.
In
scenario: yes, cherry-picked.