diff --git a/invokeai/frontend/web/src/features/controlLayers/store/canvasV2Slice.ts b/invokeai/frontend/web/src/features/controlLayers/store/canvasV2Slice.ts index 28781563fd..77697caf9e 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/canvasV2Slice.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/canvasV2Slice.ts @@ -1,5 +1,5 @@ import type { PayloadAction } from '@reduxjs/toolkit'; -import { createSlice } from '@reduxjs/toolkit'; +import { createAction, createSlice } from '@reduxjs/toolkit'; import type { PersistConfig, RootState } from 'app/store/store'; import { deepClone } from 'common/util/deepClone'; import { bboxReducers } from 'features/controlLayers/store/bboxReducers'; @@ -172,6 +172,7 @@ export const canvasV2Slice = createSlice({ state.session = deepClone(initialState.session); state.tool = deepClone(initialState.tool); state.inpaintMask = deepClone(initialState.inpaintMask); + state.initialImage = deepClone(initialState.initialImage); }, }, }); @@ -386,3 +387,5 @@ export const canvasV2PersistConfig: PersistConfig = { migrate, persistDenylist: [], }; + +export const sessionRequested = createAction(`${canvasV2Slice.name}/sessionRequested`);