mirror of
https://github.com/invoke-ai/InvokeAI
synced 2026-03-12 01:40:26 +01:00
Add support for loading Flux LoRA models in the xlabs format, which uses
keys like `double_blocks.X.processor.{qkv|proj}_lora{1|2}.{down|up}.weight`.
The xlabs format maps:
- lora1 -> img_attn (image attention stream)
- lora2 -> txt_attn (text attention stream)
- qkv -> query/key/value projection
- proj -> output projection
Changes:
- Add FluxLoRAFormat.XLabs enum value
- Add flux_xlabs_lora_conversion_utils.py with detection and conversion
- Update formats.py to detect xlabs format
- Update lora.py loader to handle xlabs format
- Update model probe to accept recognized Flux LoRA formats
- Add unit tests for xlabs format detection and conversion
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
|
||
|---|---|---|
| .. | ||
| app | ||
| backend | ||
| fixtures | ||
| inpainting | ||
| model_identification | ||
| test_model_manager | ||
| __init__.py | ||
| conftest.py | ||
| dangerously_run_function_in_subprocess.py | ||
| dev_prompts.txt | ||
| legacy_tests.sh | ||
| test_config.py | ||
| test_dangerously_run_function_in_subprocess.py | ||
| test_docs.py | ||
| test_graph_execution_state.py | ||
| test_imports.py | ||
| test_invocation_cache_memory.py | ||
| test_item_storage_memory.py | ||
| test_model_hash.py | ||
| test_model_search.py | ||
| test_node_graph.py | ||
| test_nodes.py | ||
| test_object_serializer_disk.py | ||
| test_path.py | ||
| test_profiler.py | ||
| test_session_queue.py | ||
| test_sqlite_migrator.py | ||
| validate_pr_prompt.txt | ||