fix(ui): set aspect ratio to free when using default model settings

We need to use the `widthRecalled` and `heightRecalled` actions, which handle the aspect ratio.

Closes  #5974
This commit is contained in:
psychedelicious 2024-03-21 15:48:40 +11:00
parent dacfe6853e
commit 30283a4767

View File

@ -1,14 +1,14 @@
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware'; import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
import { setDefaultSettings } from 'features/parameters/store/actions'; import { setDefaultSettings } from 'features/parameters/store/actions';
import { import {
heightChanged, heightRecalled,
setCfgRescaleMultiplier, setCfgRescaleMultiplier,
setCfgScale, setCfgScale,
setScheduler, setScheduler,
setSteps, setSteps,
vaePrecisionChanged, vaePrecisionChanged,
vaeSelected, vaeSelected,
widthChanged, widthRecalled,
} from 'features/parameters/store/generationSlice'; } from 'features/parameters/store/generationSlice';
import { import {
isParameterCFGRescaleMultiplier, isParameterCFGRescaleMultiplier,
@ -100,13 +100,13 @@ export const addSetDefaultSettingsListener = (startAppListening: AppStartListeni
if (width) { if (width) {
if (isParameterWidth(width)) { if (isParameterWidth(width)) {
dispatch(widthChanged(width)); dispatch(widthRecalled(width));
} }
} }
if (height) { if (height) {
if (isParameterHeight(height)) { if (isParameterHeight(height)) {
dispatch(heightChanged(height)); dispatch(heightRecalled(height));
} }
} }