mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: Prompt Drawer Unpinned not having SDXL UI
This commit is contained in:
parent
0420d75d2b
commit
3376968cbb
@ -1,7 +1,10 @@
|
|||||||
import { Flex } from '@chakra-ui/react';
|
import { Flex } from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
|
import { RootState } from 'app/store/store';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
|
import SDXLImageToImageTabParameters from 'features/sdxl/components/SDXLImageToImageTabParameters';
|
||||||
|
import SDXLTextToImageTabParameters from 'features/sdxl/components/SDXLTextToImageTabParameters';
|
||||||
import InvokeAILogoComponent from 'features/system/components/InvokeAILogoComponent';
|
import InvokeAILogoComponent from 'features/system/components/InvokeAILogoComponent';
|
||||||
import {
|
import {
|
||||||
activeTabNameSelector,
|
activeTabNameSelector,
|
||||||
@ -39,13 +42,23 @@ const ParametersDrawer = () => {
|
|||||||
dispatch(setShouldShowParametersPanel(false));
|
dispatch(setShouldShowParametersPanel(false));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const model = useAppSelector((state: RootState) => state.generation.model);
|
||||||
|
|
||||||
const drawerContent = useMemo(() => {
|
const drawerContent = useMemo(() => {
|
||||||
if (activeTabName === 'txt2img') {
|
if (activeTabName === 'txt2img') {
|
||||||
return <TextToImageTabParameters />;
|
return model && model.base_model === 'sdxl' ? (
|
||||||
|
<SDXLTextToImageTabParameters />
|
||||||
|
) : (
|
||||||
|
<TextToImageTabParameters />
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeTabName === 'img2img') {
|
if (activeTabName === 'img2img') {
|
||||||
return <ImageToImageTabParameters />;
|
return model && model.base_model === 'sdxl' ? (
|
||||||
|
<SDXLImageToImageTabParameters />
|
||||||
|
) : (
|
||||||
|
<ImageToImageTabParameters />
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeTabName === 'unifiedCanvas') {
|
if (activeTabName === 'unifiedCanvas') {
|
||||||
@ -53,7 +66,7 @@ const ParametersDrawer = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}, [activeTabName]);
|
}, [activeTabName, model]);
|
||||||
|
|
||||||
if (shouldPinParametersPanel) {
|
if (shouldPinParametersPanel) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user