diff --git a/invokeai/frontend/web/src/app/types/invokeai.ts b/invokeai/frontend/web/src/app/types/invokeai.ts index a2b17b483d..2fd3ff2e5a 100644 --- a/invokeai/frontend/web/src/app/types/invokeai.ts +++ b/invokeai/frontend/web/src/app/types/invokeai.ts @@ -1,6 +1,7 @@ import type { CONTROLNET_PROCESSORS } from 'features/controlAdapters/store/constants'; import type { InvokeTabName } from 'features/ui/store/tabMap'; import type { O } from 'ts-toolbelt'; +import { ParameterPrecision, ParameterScheduler } from '../../features/parameters/types/parameterSchemas'; /** * A disable-able application feature @@ -82,6 +83,8 @@ export type AppConfig = { guidance: NumericalParameterConfig; cfgRescaleMultiplier: NumericalParameterConfig; img2imgStrength: NumericalParameterConfig; + scheduler?: ParameterScheduler, + vaePrecision?: ParameterPrecision // Canvas boundingBoxHeight: NumericalParameterConfig; // initial value comes from model boundingBoxWidth: NumericalParameterConfig; // initial value comes from model diff --git a/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts b/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts index 49ca507439..0f36d8b477 100644 --- a/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts +++ b/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts @@ -230,6 +230,12 @@ export const generationSlice = createSlice({ state.height = optimalDimension; } } + if (action.payload.sd?.scheduler) { + state.scheduler = action.payload.sd.scheduler; + } + if (action.payload.sd?.vaePrecision) { + state.vaePrecision = action.payload.sd.vaePrecision; + } }); // TODO: This is a temp fix to reduce issues with T2I adapter having a different downscaling diff --git a/invokeai/frontend/web/src/features/system/store/configSlice.ts b/invokeai/frontend/web/src/features/system/store/configSlice.ts index 4e1b734a66..0d54c5c1a0 100644 --- a/invokeai/frontend/web/src/features/system/store/configSlice.ts +++ b/invokeai/frontend/web/src/features/system/store/configSlice.ts @@ -41,6 +41,8 @@ const initialConfigState: AppConfig = { boundingBoxHeight: { ...baseDimensionConfig }, scaledBoundingBoxWidth: { ...baseDimensionConfig }, scaledBoundingBoxHeight: { ...baseDimensionConfig }, + scheduler: "euler", + vaePrecision: "fp32", steps: { initial: 30, sliderMin: 1,