mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): reset clip skip to 0 if new model is sdxl
Clip skip wasn't actually used in SDXL graphs so enabling it didn't do anything, just a UI quirk. Closes #5508
This commit is contained in:
parent
653b820da1
commit
022b32c724
@ -175,8 +175,15 @@ export const generationSlice = createSlice({
|
||||
}
|
||||
|
||||
// Clamp ClipSkip Based On Selected Model
|
||||
// TODO(psyche): remove this special handling when https://github.com/invoke-ai/InvokeAI/issues/4583 is resolved
|
||||
// WIP PR here: https://github.com/invoke-ai/InvokeAI/pull/4624
|
||||
if (newModel.base_model === 'sdxl') {
|
||||
// We don't support clip skip for SDXL yet - it's not in the graphs
|
||||
state.clipSkip = 0;
|
||||
} else {
|
||||
const { maxClip } = CLIP_SKIP_MAP[newModel.base_model];
|
||||
state.clipSkip = clamp(state.clipSkip, 0, maxClip);
|
||||
}
|
||||
|
||||
if (action.meta.previousModel?.base_model === newModel.base_model) {
|
||||
// The base model hasn't changed, we don't need to optimize the size
|
||||
|
Loading…
Reference in New Issue
Block a user