Skip to content

[LoRA] accept fal-kontext LoRAs whose embedder keys lack the base_model.model. prefix - #2

Open
christopher5106 wants to merge 6 commits into
mainfrom
fix_fal_kontext_loras
Open

christopher5106 wants to merge 6 commits into
mainfrom
fix_fal_kontext_loras

Conversation

@christopher5106

@christopher5106 christopher5106 commented Sep 30, 2026 •

Copy link
Copy Markdown

Upstream: huggingface#14918 (open), fixing issue huggingface#14917.

Problem: _convert_fal_kontext_lora_to_diffusers expects every key to carry the base_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_dict should be empty".

Change: lora_conversion_utils.py accepts 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.

This PR documents a fix branch of this fork and is not meant to be merged. It is closed once the change is merged upstream, and the branch is then deleted.

…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).
DN6 and others added 4 commits September 30, 2026 17:38
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants