Skip to content

Commit d3a2be6

Browse files
feat(ui): hide clipskip on sdxl; do not add to metadata (#4625)
Hide it until #4624 is ready ## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [x] Bug Fix - [ ] Optimization - [ ] Documentation Update - [ ] Community Node Submission ## Description feat(ui): hide clipskip on sdxl; do not add to metadata Hide it until #4624 is ready ## Related Tickets & Documents <!-- For pull requests that relate or close an issue, please include them below. For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue. --> - Closes #4618
2 parents cab8d9b + 02c087e commit d3a2be6

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLImageToImageGraph.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export const buildCanvasSDXLImageToImageGraph = (
4545
seed,
4646
steps,
4747
vaePrecision,
48-
clipSkip,
4948
shouldUseCpuNoise,
5049
seamlessXAxis,
5150
seamlessYAxis,
@@ -339,7 +338,6 @@ export const buildCanvasSDXLImageToImageGraph = (
339338
vae: undefined, // option; set in addVAEToGraph
340339
controlnets: [], // populated in addControlNetToLinearGraph
341340
loras: [], // populated in addLoRAsToGraph
342-
clip_skip: clipSkip,
343341
strength,
344342
init_image: initialImage.image_name,
345343
};

invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLTextToImageGraph.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export const buildCanvasSDXLTextToImageGraph = (
4646
seed,
4747
steps,
4848
vaePrecision,
49-
clipSkip,
5049
shouldUseCpuNoise,
5150
seamlessXAxis,
5251
seamlessYAxis,
@@ -321,7 +320,6 @@ export const buildCanvasSDXLTextToImageGraph = (
321320
vae: undefined, // option; set in addVAEToGraph
322321
controlnets: [], // populated in addControlNetToLinearGraph
323322
loras: [], // populated in addLoRAsToGraph
324-
clip_skip: clipSkip,
325323
};
326324

327325
graph.edges.push({

invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildLinearSDXLImageToImageGraph.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const buildLinearSDXLImageToImageGraph = (
4949
shouldFitToWidthHeight,
5050
width,
5151
height,
52-
clipSkip,
5352
shouldUseCpuNoise,
5453
vaePrecision,
5554
seamlessXAxis,
@@ -349,7 +348,6 @@ export const buildLinearSDXLImageToImageGraph = (
349348
vae: undefined,
350349
controlnets: [],
351350
loras: [],
352-
clip_skip: clipSkip,
353351
strength: strength,
354352
init_image: initialImage.imageName,
355353
positive_style_prompt: positiveStylePrompt,

invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildLinearSDXLTextToImageGraph.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export const buildLinearSDXLTextToImageGraph = (
3838
steps,
3939
width,
4040
height,
41-
clipSkip,
4241
shouldUseCpuNoise,
4342
vaePrecision,
4443
seamlessXAxis,
@@ -243,7 +242,6 @@ export const buildLinearSDXLTextToImageGraph = (
243242
vae: undefined,
244243
controlnets: [],
245244
loras: [],
246-
clip_skip: clipSkip,
247245
positive_style_prompt: positiveStylePrompt,
248246
negative_style_prompt: negativeStylePrompt,
249247
};

invokeai/frontend/web/src/features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ import ParamClipSkip from './ParamClipSkip';
1313
const selector = createSelector(
1414
stateSelector,
1515
(state: RootState) => {
16-
const { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
16+
const { clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
1717
state.generation;
1818

19-
return { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise };
19+
return { clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise };
2020
},
2121
defaultSelectorOptions
2222
);
2323

2424
export default function ParamAdvancedCollapse() {
25-
const { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
25+
const { clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
2626
useAppSelector(selector);
2727
const { t } = useTranslation();
2828
const activeLabel = useMemo(() => {
@@ -34,7 +34,7 @@ export default function ParamAdvancedCollapse() {
3434
activeLabel.push(t('parameters.gpuNoise'));
3535
}
3636

37-
if (clipSkip > 0) {
37+
if (clipSkip > 0 && model && model.base_model !== 'sdxl') {
3838
activeLabel.push(
3939
t('parameters.clipSkipWithLayerCount', { layerCount: clipSkip })
4040
);
@@ -49,15 +49,19 @@ export default function ParamAdvancedCollapse() {
4949
}
5050

5151
return activeLabel.join(', ');
52-
}, [clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise, t]);
52+
}, [clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise, t]);
5353

5454
return (
5555
<IAICollapse label={t('common.advanced')} activeLabel={activeLabel}>
5656
<Flex sx={{ flexDir: 'column', gap: 2 }}>
5757
<ParamSeamless />
5858
<Divider />
59-
<ParamClipSkip />
60-
<Divider pt={2} />
59+
{model && model?.base_model !== 'sdxl' && (
60+
<>
61+
<ParamClipSkip />
62+
<Divider pt={2} />
63+
</>
64+
)}
6165
<ParamCpuNoiseToggle />
6266
</Flex>
6367
</IAICollapse>

invokeai/frontend/web/src/features/parameters/components/Parameters/Advanced/ParamClipSkip.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export default function ParamClipSkip() {
4242
return clipSkipMap[model.base_model].markers;
4343
}, [model]);
4444

45+
if (model?.base_model === 'sdxl') {
46+
return null;
47+
}
48+
4549
return (
4650
<IAIInformationalPopover details="clipSkip">
4751
<IAISlider

0 commit comments

Comments
 (0)