File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware' ;
2
+ import { isNil } from 'es-toolkit' ;
2
3
import { bboxHeightChanged , bboxWidthChanged } from 'features/controlLayers/store/canvasSlice' ;
3
4
import { selectIsStaging } from 'features/controlLayers/store/canvasStagingAreaSlice' ;
4
5
import {
@@ -86,10 +87,16 @@ export const addSetDefaultSettingsListener = (startAppListening: AppStartListeni
86
87
}
87
88
}
88
89
89
- if ( cfg_rescale_multiplier ) {
90
+ if ( ! isNil ( cfg_rescale_multiplier ) ) {
90
91
if ( isParameterCFGRescaleMultiplier ( cfg_rescale_multiplier ) ) {
91
92
dispatch ( setCfgRescaleMultiplier ( cfg_rescale_multiplier ) ) ;
92
93
}
94
+ } else {
95
+ // Set this to 0 if it doesn't have a default. This value is
96
+ // easy to miss in the UI when users are resetting defaults
97
+ // and leaving it non-zero could lead to detrimental
98
+ // effects.
99
+ dispatch ( setCfgRescaleMultiplier ( 0 ) ) ;
93
100
}
94
101
95
102
if ( steps ) {
You can’t perform that action at this time.
0 commit comments