add scheduler and vaePrecision to config

This commit is contained in:
Mary Hipp 2024-02-29 13:02:46 -05:00
parent 8926a1a424
commit 5a35550144
3 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -41,6 +41,8 @@ const initialConfigState: AppConfig = {
boundingBoxHeight: { ...baseDimensionConfig },
scaledBoundingBoxWidth: { ...baseDimensionConfig },
scaledBoundingBoxHeight: { ...baseDimensionConfig },
scheduler: "euler",
vaePrecision: "fp32",
steps: {
initial: 30,
sliderMin: 1,