mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes: Progress bar does not activate when changing model
This commit is contained in:
parent
c19b02ab21
commit
7b329b7c91
@ -14,6 +14,7 @@ import { OptionsState } from '../../features/options/optionsSlice';
|
|||||||
import {
|
import {
|
||||||
addLogEntry,
|
addLogEntry,
|
||||||
errorOccurred,
|
errorOccurred,
|
||||||
|
modelChangeRequested,
|
||||||
setCurrentStatus,
|
setCurrentStatus,
|
||||||
setIsCancelable,
|
setIsCancelable,
|
||||||
setIsProcessing,
|
setIsProcessing,
|
||||||
@ -191,9 +192,7 @@ const makeSocketIOEmitters = (
|
|||||||
socketio.emit('requestSystemConfig');
|
socketio.emit('requestSystemConfig');
|
||||||
},
|
},
|
||||||
emitRequestModelChange: (modelName: string) => {
|
emitRequestModelChange: (modelName: string) => {
|
||||||
dispatch(setCurrentStatus('Changing Model'));
|
dispatch(modelChangeRequested());
|
||||||
dispatch(setIsProcessing(true));
|
|
||||||
dispatch(setIsCancelable(false));
|
|
||||||
socketio.emit('requestModelChange', modelName);
|
socketio.emit('requestModelChange', modelName);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -172,6 +172,12 @@ export const systemSlice = createSlice({
|
|||||||
setIsCancelable: (state, action: PayloadAction<boolean>) => {
|
setIsCancelable: (state, action: PayloadAction<boolean>) => {
|
||||||
state.isCancelable = action.payload;
|
state.isCancelable = action.payload;
|
||||||
},
|
},
|
||||||
|
modelChangeRequested: (state) => {
|
||||||
|
state.currentStatus = 'Loading Model';
|
||||||
|
state.isCancelable = false;
|
||||||
|
state.isProcessing = true;
|
||||||
|
state.currentStatusHasSteps = false;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -193,6 +199,7 @@ export const {
|
|||||||
errorSeen,
|
errorSeen,
|
||||||
setModelList,
|
setModelList,
|
||||||
setIsCancelable,
|
setIsCancelable,
|
||||||
|
modelChangeRequested,
|
||||||
} = systemSlice.actions;
|
} = systemSlice.actions;
|
||||||
|
|
||||||
export default systemSlice.reducer;
|
export default systemSlice.reducer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user