InvokeAI/invokeai/backend
psychedelicious 243de683d7 fix(mm): handle integer state dict keys in probe
It's possible for a model's state dict to have integer keys, though we do not actually support such models.

As part of probing, we call `key.startswith(...)` on the state dict keys. This raises an `AttributeError` for integer keys.

This logic is in `invokeai/backend/model_manager/probe.py:get_model_type_from_checkpoint`

To fix this, we can cast the keys to strings first. The models w/ integer keys will still fail to be probed, but we'll get a `InvalidModelConfigException` instead of `AttributeError`.

Closes #6044
2024-03-27 09:30:25 +11:00
..
image_util tidy: "fit_image_to_resolution" -> "resize_image_to_resolution" 2024-03-21 07:02:57 -07:00
ip_adapter final tidying before marking PR as ready for review 2024-03-01 10:42:33 +11:00
model_hash feat(mm): rename "blake3" to "blake3_multi" 2024-03-22 08:26:36 +11:00
model_manager fix(mm): handle integer state dict keys in probe 2024-03-27 09:30:25 +11:00
onnx final tidying before marking PR as ready for review 2024-03-01 10:42:33 +11:00
stable_diffusion cleanup: remove unused scripts, cruft 2024-03-20 15:05:25 +11:00
tiles feat(nodes): extract LATENT_SCALE_FACTOR to constants.py 2024-03-01 10:42:33 +11:00
util cleanup: remove unused scripts, cruft 2024-03-20 15:05:25 +11:00
__init__.py consolidate model manager parts into a single class 2024-03-01 10:42:33 +11:00
lora.py final tidying before marking PR as ready for review 2024-03-01 10:42:33 +11:00
model_patcher.py chore: ruff 2024-03-01 10:42:33 +11:00
raw_model.py final tidying before marking PR as ready for review 2024-03-01 10:42:33 +11:00
textual_inversion.py final tidying before marking PR as ready for review 2024-03-01 10:42:33 +11:00