mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: Reset clipSkip when advanced options is turned off
This commit is contained in:
parent
1ac787f3c1
commit
c6d6b33e3c
@ -2,6 +2,7 @@ import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import { DEFAULT_SCHEDULER_NAME } from 'app/constants';
|
||||
import { configChanged } from 'features/system/store/configSlice';
|
||||
import { setShouldShowAdvancedOptions } from 'features/ui/store/uiSlice';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { ImageDTO } from 'services/api/types';
|
||||
import {
|
||||
@ -230,6 +231,10 @@ export const generationSlice = createSlice({
|
||||
state.model = defaultModel;
|
||||
}
|
||||
});
|
||||
builder.addCase(setShouldShowAdvancedOptions, (state, action) => {
|
||||
const advancedOptionsStatus = action.payload;
|
||||
if (!advancedOptionsStatus) state.clipSkip = 0;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user