feat: add FLUX.2 Klein model support

Add support for FLUX.2 Klein distilled models (4B and 9B variants):

- Add pipeline loader for Flux2KleinPipeline
- Add model detection for 'flux.2' + 'klein' patterns
- Add pipeline mapping in shared_items
- Add shared Qwen3ForCausalLM text encoder handling:
  - 4B variants use Z-Image-Turbo's Qwen3-8B
  - 9B variants use FLUX.2-klein-9B's Qwen3-14B
- Add reference entries for distilled (4B, 9B) and base models
- Update diffusers commit for Flux2KleinPipeline support
This commit is contained in:
CalamitousFelicitousness
2026-01-16 01:16:06 +00:00
parent 6f86cc633f
commit fe99d3fe5d
8 changed files with 106 additions and 1 deletions
+4
View File
@@ -359,6 +359,10 @@ def load_diffuser_force(detected_model_type, checkpoint_info, diffusers_load_con
from pipelines.model_flux2 import load_flux2
sd_model = load_flux2(checkpoint_info, diffusers_load_config)
allow_post_quant = False
elif model_type in ['FLUX2 Klein']:
from pipelines.model_flux2_klein import load_flux2_klein
sd_model = load_flux2_klein(checkpoint_info, diffusers_load_config)
allow_post_quant = False
elif model_type in ['FLEX']:
from pipelines.model_flex import load_flex
sd_model = load_flex(checkpoint_info, diffusers_load_config)