mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): hide clipskip on sdxl; do not add to metadata
Hide it until #4624 is ready
This commit is contained in:
parent
cab8d9bb20
commit
02c087ee37
@ -45,7 +45,6 @@ export const buildCanvasSDXLImageToImageGraph = (
|
||||
seed,
|
||||
steps,
|
||||
vaePrecision,
|
||||
clipSkip,
|
||||
shouldUseCpuNoise,
|
||||
seamlessXAxis,
|
||||
seamlessYAxis,
|
||||
@ -339,7 +338,6 @@ export const buildCanvasSDXLImageToImageGraph = (
|
||||
vae: undefined, // option; set in addVAEToGraph
|
||||
controlnets: [], // populated in addControlNetToLinearGraph
|
||||
loras: [], // populated in addLoRAsToGraph
|
||||
clip_skip: clipSkip,
|
||||
strength,
|
||||
init_image: initialImage.image_name,
|
||||
};
|
||||
|
@ -46,7 +46,6 @@ export const buildCanvasSDXLTextToImageGraph = (
|
||||
seed,
|
||||
steps,
|
||||
vaePrecision,
|
||||
clipSkip,
|
||||
shouldUseCpuNoise,
|
||||
seamlessXAxis,
|
||||
seamlessYAxis,
|
||||
@ -321,7 +320,6 @@ export const buildCanvasSDXLTextToImageGraph = (
|
||||
vae: undefined, // option; set in addVAEToGraph
|
||||
controlnets: [], // populated in addControlNetToLinearGraph
|
||||
loras: [], // populated in addLoRAsToGraph
|
||||
clip_skip: clipSkip,
|
||||
};
|
||||
|
||||
graph.edges.push({
|
||||
|
@ -49,7 +49,6 @@ export const buildLinearSDXLImageToImageGraph = (
|
||||
shouldFitToWidthHeight,
|
||||
width,
|
||||
height,
|
||||
clipSkip,
|
||||
shouldUseCpuNoise,
|
||||
vaePrecision,
|
||||
seamlessXAxis,
|
||||
@ -349,7 +348,6 @@ export const buildLinearSDXLImageToImageGraph = (
|
||||
vae: undefined,
|
||||
controlnets: [],
|
||||
loras: [],
|
||||
clip_skip: clipSkip,
|
||||
strength: strength,
|
||||
init_image: initialImage.imageName,
|
||||
positive_style_prompt: positiveStylePrompt,
|
||||
|
@ -38,7 +38,6 @@ export const buildLinearSDXLTextToImageGraph = (
|
||||
steps,
|
||||
width,
|
||||
height,
|
||||
clipSkip,
|
||||
shouldUseCpuNoise,
|
||||
vaePrecision,
|
||||
seamlessXAxis,
|
||||
@ -243,7 +242,6 @@ export const buildLinearSDXLTextToImageGraph = (
|
||||
vae: undefined,
|
||||
controlnets: [],
|
||||
loras: [],
|
||||
clip_skip: clipSkip,
|
||||
positive_style_prompt: positiveStylePrompt,
|
||||
negative_style_prompt: negativeStylePrompt,
|
||||
};
|
||||
|
@ -13,16 +13,16 @@ import ParamClipSkip from './ParamClipSkip';
|
||||
const selector = createSelector(
|
||||
stateSelector,
|
||||
(state: RootState) => {
|
||||
const { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
|
||||
const { clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
|
||||
state.generation;
|
||||
|
||||
return { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise };
|
||||
return { clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise };
|
||||
},
|
||||
defaultSelectorOptions
|
||||
);
|
||||
|
||||
export default function ParamAdvancedCollapse() {
|
||||
const { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
|
||||
const { clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
|
||||
useAppSelector(selector);
|
||||
const { t } = useTranslation();
|
||||
const activeLabel = useMemo(() => {
|
||||
@ -34,7 +34,7 @@ export default function ParamAdvancedCollapse() {
|
||||
activeLabel.push(t('parameters.gpuNoise'));
|
||||
}
|
||||
|
||||
if (clipSkip > 0) {
|
||||
if (clipSkip > 0 && model && model.base_model !== 'sdxl') {
|
||||
activeLabel.push(
|
||||
t('parameters.clipSkipWithLayerCount', { layerCount: clipSkip })
|
||||
);
|
||||
@ -49,15 +49,19 @@ export default function ParamAdvancedCollapse() {
|
||||
}
|
||||
|
||||
return activeLabel.join(', ');
|
||||
}, [clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise, t]);
|
||||
}, [clipSkip, model, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise, t]);
|
||||
|
||||
return (
|
||||
<IAICollapse label={t('common.advanced')} activeLabel={activeLabel}>
|
||||
<Flex sx={{ flexDir: 'column', gap: 2 }}>
|
||||
<ParamSeamless />
|
||||
<Divider />
|
||||
<ParamClipSkip />
|
||||
<Divider pt={2} />
|
||||
{model && model?.base_model !== 'sdxl' && (
|
||||
<>
|
||||
<ParamClipSkip />
|
||||
<Divider pt={2} />
|
||||
</>
|
||||
)}
|
||||
<ParamCpuNoiseToggle />
|
||||
</Flex>
|
||||
</IAICollapse>
|
||||
|
@ -42,6 +42,10 @@ export default function ParamClipSkip() {
|
||||
return clipSkipMap[model.base_model].markers;
|
||||
}, [model]);
|
||||
|
||||
if (model?.base_model === 'sdxl') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<IAIInformationalPopover details="clipSkip">
|
||||
<IAISlider
|
||||
|
Loading…
Reference in New Issue
Block a user