From b6f5267385a8215dc0a6060973e4332f92fc08e0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 16 May 2023 10:21:18 +1000 Subject: [PATCH] chore(ui): clean up generationSlice --- .../parameters/store/generationSlice.ts | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts b/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts index 604aabbc9b..c6df7cec63 100644 --- a/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts +++ b/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts @@ -11,9 +11,8 @@ export interface GenerationState { height: number; img2imgStrength: number; infillMethod: string; - initialImage?: InvokeAI.Image; // can be an Image or url + initialImage?: InvokeAI.Image; iterations: number; - maskPath: string; perlin: number; prompt: string; negativePrompt: string; @@ -48,7 +47,6 @@ export const initialGenerationState: GenerationState = { img2imgStrength: 0.75, infillMethod: 'patchmatch', iterations: 1, - maskPath: '', perlin: 0, prompt: '', negativePrompt: '', @@ -145,9 +143,6 @@ export const generationSlice = createSlice({ setImg2imgStrength: (state, action: PayloadAction) => { state.img2imgStrength = action.payload; }, - setMaskPath: (state, action: PayloadAction) => { - state.maskPath = action.payload; - }, setSeamless: (state, action: PayloadAction) => { state.shouldUseSeamless = action.payload; }, @@ -163,19 +158,6 @@ export const generationSlice = createSlice({ resetSeed: (state) => { state.seed = -1; }, - setParameter: ( - state, - action: PayloadAction<{ key: string; value: string | number | boolean }> - ) => { - // TODO: This probably needs to be refactored. - // TODO: This probably also needs to be fixed after the reorg. - const { key, value } = action.payload; - const temp = { ...state, [key]: value }; - if (key === 'seed') { - temp.shouldRandomizeSeed = false; - } - return temp; - }, setShouldGenerateVariations: (state, action: PayloadAction) => { state.shouldGenerateVariations = action.payload; }, @@ -258,10 +240,7 @@ export const { setHeight, setImg2imgStrength, setInfillMethod, - // setInitialImage, setIterations, - setMaskPath, - setParameter, setPerlin, setPrompt, setNegativePrompt,