InvokeAI/invokeai/frontend/web/src/features/parameters
psychedelicious a071873327 feat(ui): fix a lot of model-related crashes/bugs
We were storing all types of models by their model ID, which is a format like `sd-1/main/deliberate`.

This meant we had to do a lot of extra parsing, because nodes actually wants something like `{base_model: 'sd-1', model_name: 'deliberate'}`.

Some of this parsing was done with zod's error-throwing `parse()` method, and in other places it was done with brittle string parsing.

This commit refactors the state to use the object form of models.

There is still a bit of string parsing done in the to construct the ID from the object form, but it's far less complicated.

Also, the zod parsing is now done using `safeParse()`, which does not throw. This requires a few more conditional checks, but should prevent further crashes.
2023-07-14 16:07:22 +10:00
..
components feat(ui): fix a lot of model-related crashes/bugs 2023-07-14 16:07:22 +10:00
hooks feat(ui): fix a lot of model-related crashes/bugs 2023-07-14 16:07:22 +10:00
store feat(ui): fix a lot of model-related crashes/bugs 2023-07-14 16:07:22 +10:00
types feat(ui): fix a lot of model-related crashes/bugs 2023-07-14 16:07:22 +10:00
util feat(ui): fix a lot of model-related crashes/bugs 2023-07-14 16:07:22 +10:00