InvokeAI/invokeai
psychedelicious 6e869e6038 fix(ui): migrate redux state that has models
With the change to model identifiers from v3 to v4, if a user had persisted redux state with the old format, we could get unexpected runtime errors when rehydrating state if we try to access model attributes that no longer exist.

For example, the CLIP Skip component does this:

```ts
CLIP_SKIP_MAP[model.base].maxClip
```

In v3, models had a `base_type` attribute, but it is renamed to `base` in v4. This code therefore causes a runtime error:
- `model.base` is `undefined`
- `CLIP_SKIP_MAP[undefined]` is also undefined
- `undefined.maxClip` is a runtime error!

Resolved by adding a migration for the redux slices that have model identifiers. The migration simply resets the slice or the part of the slice that is affected, when it's simple to do a partial reset.

Closes #6000
2024-03-22 07:55:13 +11:00
..
app feat: adaptation of Lineart Anime processor 2024-03-21 07:02:57 -07:00
assets feat(api): chore: pydantic & fastapi upgrade 2023-10-17 14:59:25 +11:00
backend [feature] Add probe for SDXL controlnet models (#5382) 2024-03-21 14:49:45 +00:00
configs cleanup: remove unused scripts, cruft 2024-03-20 15:05:25 +11:00
frontend fix(ui): migrate redux state that has models 2024-03-22 07:55:13 +11:00
invocation_api feat(nodes): "ModelField" -> "ModelIdentifierField", add hash/name/base/type 2024-03-10 11:03:38 +11:00
version Update rc version, regenerate schema 2024-03-20 08:21:23 -07:00
__init__.py Various fixes 2023-01-30 18:42:17 -05:00