InvokeAI/invokeai/backend
Alexander Eichhorn 54c1609687
Filter non-transformer keys from Z-Image checkpoint state dicts (#8918)
Merged Z-Image checkpoints (e.g. models with LoRAs baked in) may bundle
text encoder weights (text_encoders.*) or other non-transformer keys
alongside the transformer weights. These cause load_state_dict() to fail
with strict=True. Instead of disabling strict mode, explicitly whitelist
valid ZImageTransformer2DModel key prefixes and discard everything else.

Also moves RAM allocation after filtering so it doesn't over-allocate
for discarded keys.

Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
2026-02-28 16:22:29 +00:00
..
flux feat(z-image): add Z-Image Base (undistilled) model variant support (#8799) 2026-02-20 00:32:38 +00:00
flux2 fix(flux2): Fix FLUX.2 Klein image generation quality (#8838) 2026-02-06 00:34:54 -05:00
image_util Fix bare except clauses and mutable default arguments (#8871) 2026-02-22 23:25:15 -05:00
ip_adapter ruff format 2025-09-18 11:05:32 +10:00
model_hash
model_manager Filter non-transformer keys from Z-Image checkpoint state dicts (#8918) 2026-02-28 16:22:29 +00:00
onnx
patches Feature: Add FLUX.2 LOKR model support (detection and loading) (#8909) 2026-02-27 00:45:13 +00:00
quantization fix(gguf): ensure dequantized tensors are on correct device for MPS (#8713) 2026-01-02 00:45:50 +00:00
rectified_flow chore:ruff 2025-05-27 07:28:47 +10:00
sig_lip feat(mm): siglip model loading supports partial loading 2025-04-18 10:12:03 +10:00
stable_diffusion feat: Add Z-Image-Turbo model support 2025-12-01 00:22:32 +01:00
tiles
util Feature(backend): Add a command-line utility for running gallery maintenance (#8827) 2026-02-16 23:44:19 +00:00
z_image fix(z_image): use unrestricted image self-attention for regional prompting (#8718) 2025-12-28 11:32:50 -05:00
__init__.py
llava_onevision_pipeline.py feat(mm): llava model loading supports partial loading; fix OOM crash on initial load 2025-04-18 10:12:03 +10:00
model_patcher.py refactor: model manager v3 (#8607) 2025-10-15 10:18:53 +11:00
raw_model.py
spandrel_image_to_image_model.py
textual_inversion.py Add util functions calc_tensor_size(...) and calc_tensors_size(...). 2024-09-15 04:39:56 +03:00