InvokeAI/invokeai
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
..
app Fix: Replace deprecated huggingface_hub.get_token_permission() with whoami() (#8913) 2026-02-28 15:59:45 +00:00
assets
backend Filter non-transformer keys from Z-Image checkpoint state dicts (#8918) 2026-02-28 16:22:29 +00:00
configs
frontend ui: translations update from weblate (#8924) 2026-02-28 15:09:46 +00:00
invocation_api
version chore(CI/CD): bump version to 6.11.1.post1 (#8852) 2026-02-06 15:24:00 -05:00
__init__.py