mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): hide HRF if SDXL model selected
This commit is contained in:
parent
1ac85fd049
commit
88164447e9
@ -26,7 +26,7 @@ import { ImageSizeLinear } from './ImageSizeLinear';
|
|||||||
const selector = createMemoizedSelector(
|
const selector = createMemoizedSelector(
|
||||||
[selectGenerationSlice, selectCanvasSlice, selectHrfSlice, activeTabNameSelector],
|
[selectGenerationSlice, selectCanvasSlice, selectHrfSlice, activeTabNameSelector],
|
||||||
(generation, canvas, hrf, activeTabName) => {
|
(generation, canvas, hrf, activeTabName) => {
|
||||||
const { shouldRandomizeSeed } = generation;
|
const { shouldRandomizeSeed, model } = generation;
|
||||||
const { hrfEnabled } = hrf;
|
const { hrfEnabled } = hrf;
|
||||||
const badges: string[] = [];
|
const badges: string[] = [];
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ const selector = createMemoizedSelector(
|
|||||||
if (hrfEnabled) {
|
if (hrfEnabled) {
|
||||||
badges.push('HiRes Fix');
|
badges.push('HiRes Fix');
|
||||||
}
|
}
|
||||||
return { badges, activeTabName };
|
return { badges, activeTabName, isSDXL: model?.base_model === 'sdxl' };
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ const scalingLabelProps: FormLabelProps = {
|
|||||||
|
|
||||||
export const ImageSettingsAccordion = memo(() => {
|
export const ImageSettingsAccordion = memo(() => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { badges, activeTabName } = useAppSelector(selector);
|
const { badges, activeTabName, isSDXL } = useAppSelector(selector);
|
||||||
const { isOpen: isOpenAccordion, onToggle: onToggleAccordion } = useStandaloneAccordionToggle({
|
const { isOpen: isOpenAccordion, onToggle: onToggleAccordion } = useStandaloneAccordionToggle({
|
||||||
id: 'image-settings',
|
id: 'image-settings',
|
||||||
defaultIsOpen: true,
|
defaultIsOpen: true,
|
||||||
@ -94,7 +94,7 @@ export const ImageSettingsAccordion = memo(() => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
{(activeTabName === 'img2img' || activeTabName === 'unifiedCanvas') && <ImageToImageStrength />}
|
{(activeTabName === 'img2img' || activeTabName === 'unifiedCanvas') && <ImageToImageStrength />}
|
||||||
{activeTabName === 'img2img' && <ImageToImageFit />}
|
{activeTabName === 'img2img' && <ImageToImageFit />}
|
||||||
{activeTabName === 'txt2img' && <HrfSettings />}
|
{activeTabName === 'txt2img' && !isSDXL && <HrfSettings />}
|
||||||
{activeTabName === 'unifiedCanvas' && (
|
{activeTabName === 'unifiedCanvas' && (
|
||||||
<>
|
<>
|
||||||
<ParamScaleBeforeProcessing />
|
<ParamScaleBeforeProcessing />
|
||||||
|
Loading…
Reference in New Issue
Block a user