Skip to content

Add Selective LoRA Loader support for FLUX 2 Klein 9B#46

Open
diodiogod wants to merge 1 commit into
shootthesound:mainfrom
diodiogod:flux-klein-support
Open

Add Selective LoRA Loader support for FLUX 2 Klein 9B#46
diodiogod wants to merge 1 commit into
shootthesound:mainfrom
diodiogod:flux-klein-support

Conversation

@diodiogod
Copy link
Copy Markdown

What

Adds selective LoRA block loading support for FLUX 2 Klein 9B models.

FLUX 2 Klein 9B has a smaller architecture than standard FLUX:

  • 8 double blocks (vs 19 in standard FLUX)
  • 24 single blocks (vs 38 in standard FLUX)
  • 32 total blocks

Covers both flux-2-klein-9b (distilled) and flux-2-klein-base-9b — same block architecture, same key naming conventions as standard FLUX (double_blocks.N, single_blocks.N).

Changes

  • selective_lora_loader.py: Add FLUXKleinSelectiveLoRALoader (V1 node)
  • lora_analyzer_v2.py: Add FLUX_KLEIN config for V2 combined analyzer+loader node
  • web/js/dynamic_inputs.js: Register Klein nodes with correct block configs and presets
  • __init__.py: Register FLUXKleinSelectiveLoRALoader

New nodes

  • Selective LoRA Loader (FLUX 2 Klein) — V1 standalone loader
  • FLUX 2 Klein Analyzer + Selective Loader V2 — V2 combined analyzer+loader

Note

This PR is intentionally kept minimal (Klein support only). In my fork I am merging this together with PR #30 (bidirectional sync + slider improvements). If you are interested in that feature as well, it is available there.

FLUX 2 Klein 9B has a smaller architecture than standard FLUX:
- 8 double blocks (vs 19 in standard FLUX)
- 24 single blocks (vs 38 in standard FLUX)
- 32 total blocks

Covers both flux-2-klein-9b (distilled) and flux-2-klein-base-9b
which share the same block architecture.

Changes:
- selective_lora_loader.py: Add FLUXKleinSelectiveLoRALoader (V1)
- lora_analyzer_v2.py: Add FLUX_KLEIN config for V2 combined node
- web/js/dynamic_inputs.js: Add Klein node configs and register nodes
- __init__.py: Register FLUXKleinSelectiveLoRALoader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant