diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts index b658354c42..60dc173cb4 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts @@ -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; })