mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): model install progress sets total bytes correctly
This commit is contained in:
parent
80065858ed
commit
b218282149
@ -12,13 +12,14 @@ export const addModelInstallEventListener = () => {
|
||||
startAppListening({
|
||||
actionCreator: socketModelInstallDownloading,
|
||||
effect: async (action, { dispatch }) => {
|
||||
const { bytes, id } = action.payload.data;
|
||||
const { bytes, total_bytes, id } = action.payload.data;
|
||||
|
||||
dispatch(
|
||||
modelsApi.util.updateQueryData('getModelImports', undefined, (draft) => {
|
||||
const modelImport = draft.find((m) => m.id === id);
|
||||
if (modelImport) {
|
||||
modelImport.bytes = bytes;
|
||||
modelImport.total_bytes = total_bytes;
|
||||
modelImport.status = 'downloading';
|
||||
}
|
||||
return draft;
|
||||
@ -48,7 +49,7 @@ export const addModelInstallEventListener = () => {
|
||||
startAppListening({
|
||||
actionCreator: socketModelInstallError,
|
||||
effect: (action, { dispatch }) => {
|
||||
const { id, error_type } = action.payload.data;
|
||||
const { id, error, error_type } = action.payload.data;
|
||||
|
||||
dispatch(
|
||||
modelsApi.util.updateQueryData('getModelImports', undefined, (draft) => {
|
||||
@ -56,6 +57,7 @@ export const addModelInstallEventListener = () => {
|
||||
if (modelImport) {
|
||||
modelImport.status = 'error';
|
||||
modelImport.error_reason = error_type;
|
||||
modelImport.error = error;
|
||||
}
|
||||
return draft;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user