mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-02 14:35:14 -05:00
Previously, we didn't differentiate between model install errors for different types of model install sources, resulting in a buggy UX: - If a HF model install failed, but it was a HF URL install and not a repo id install, the link to the HF model page was incorrect. - If a non-HF URL install (e.g. civitai) failed, we treated it as a HF URL install. In this case, if the user's HF token was invalid or unset, we directed the user to set it. If the HF token was valid, we displayed an empty red toast. If it's not a HF URL install, then of course neither of these are correct. Also, the logic for handling the toasts was a bit complicated. This change does a few things: - Consolidate the model install error toasts into one place - the socket.io event handler for the model install error event. There is no more global state for the toasts and there are no hooks managing them. - Handling the different cases for errors, including all combinations of HF/non-HF and unauthorized/forbidden/unknown.