mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: Add VAE Select to Linea UI Panels (non func)
This commit is contained in:
parent
51db4d1269
commit
d61b3818fe
@ -7,7 +7,6 @@ import {
|
|||||||
VaeModelInputFieldValue,
|
VaeModelInputFieldValue,
|
||||||
} from 'features/nodes/types/types';
|
} from 'features/nodes/types/types';
|
||||||
import { MODEL_TYPE_MAP as BASE_MODEL_NAME_MAP } from 'features/system/components/ModelSelect';
|
import { MODEL_TYPE_MAP as BASE_MODEL_NAME_MAP } from 'features/system/components/ModelSelect';
|
||||||
import { MODEL_TYPE_MAP } from 'features/system/components/VAESelect';
|
|
||||||
import { forEach } from 'lodash-es';
|
import { forEach } from 'lodash-es';
|
||||||
import { memo, useCallback, useEffect, useMemo } from 'react';
|
import { memo, useCallback, useEffect, useMemo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@ -55,7 +54,7 @@ const VaeModelInputFieldComponent = (
|
|||||||
data.push({
|
data.push({
|
||||||
value: id,
|
value: id,
|
||||||
label: model.name,
|
label: model.name,
|
||||||
group: MODEL_TYPE_MAP[model.base_model],
|
group: BASE_MODEL_NAME_MAP[model.base_model],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
import { Box, Flex } from '@chakra-ui/react';
|
import { Box, Flex } from '@chakra-ui/react';
|
||||||
import ModelSelect from 'features/system/components/ModelSelect';
|
import ModelSelect from 'features/system/components/ModelSelect';
|
||||||
|
import VAESelect from 'features/system/components/VAESelect';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import ParamScheduler from './ParamScheduler';
|
|
||||||
|
|
||||||
const ParamSchedulerAndModel = () => {
|
const ParamModelandVAE = () => {
|
||||||
return (
|
return (
|
||||||
<Flex gap={3} w="full">
|
<Flex gap={3} w="full">
|
||||||
<Box w="25rem">
|
|
||||||
<ParamScheduler />
|
|
||||||
</Box>
|
|
||||||
<Box w="full">
|
<Box w="full">
|
||||||
<ModelSelect />
|
<ModelSelect />
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box w="full">
|
||||||
|
<VAESelect />
|
||||||
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ParamSchedulerAndModel);
|
export default memo(ParamModelandVAE);
|
@ -10,11 +10,7 @@ import { useListModelsQuery } from 'services/api/endpoints/models';
|
|||||||
|
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { vaeSelected } from 'features/parameters/store/generationSlice';
|
import { vaeSelected } from 'features/parameters/store/generationSlice';
|
||||||
|
import { MODEL_TYPE_MAP } from './ModelSelect';
|
||||||
export const MODEL_TYPE_MAP = {
|
|
||||||
'sd-1': 'Stable Diffusion 1.x',
|
|
||||||
'sd-2': 'Stable Diffusion 2.x',
|
|
||||||
};
|
|
||||||
|
|
||||||
const VAESelect = () => {
|
const VAESelect = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
import { memo } from 'react';
|
|
||||||
import { Box, Flex, useDisclosure } from '@chakra-ui/react';
|
import { Box, Flex, useDisclosure } from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { uiSelector } from 'features/ui/store/uiSelectors';
|
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
import { useAppSelector } from 'app/store/storeHooks';
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
|
|
||||||
import ParamSteps from 'features/parameters/components/Parameters/Core/ParamSteps';
|
|
||||||
import ParamCFGScale from 'features/parameters/components/Parameters/Core/ParamCFGScale';
|
|
||||||
import ParamWidth from 'features/parameters/components/Parameters/Core/ParamWidth';
|
|
||||||
import ParamHeight from 'features/parameters/components/Parameters/Core/ParamHeight';
|
|
||||||
import ImageToImageStrength from 'features/parameters/components/Parameters/ImageToImage/ImageToImageStrength';
|
|
||||||
import ImageToImageFit from 'features/parameters/components/Parameters/ImageToImage/ImageToImageFit';
|
|
||||||
import { generationSelector } from 'features/parameters/store/generationSelectors';
|
|
||||||
import ParamSchedulerAndModel from 'features/parameters/components/Parameters/Core/ParamSchedulerAndModel';
|
|
||||||
import ParamSeedFull from 'features/parameters/components/Parameters/Seed/ParamSeedFull';
|
|
||||||
import IAICollapse from 'common/components/IAICollapse';
|
import IAICollapse from 'common/components/IAICollapse';
|
||||||
|
import ParamCFGScale from 'features/parameters/components/Parameters/Core/ParamCFGScale';
|
||||||
|
import ParamHeight from 'features/parameters/components/Parameters/Core/ParamHeight';
|
||||||
|
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
|
||||||
|
import ParamModelandVAE from 'features/parameters/components/Parameters/Core/ParamModelandVAE';
|
||||||
|
import ParamScheduler from 'features/parameters/components/Parameters/Core/ParamScheduler';
|
||||||
|
import ParamSteps from 'features/parameters/components/Parameters/Core/ParamSteps';
|
||||||
|
import ParamWidth from 'features/parameters/components/Parameters/Core/ParamWidth';
|
||||||
|
import ImageToImageFit from 'features/parameters/components/Parameters/ImageToImage/ImageToImageFit';
|
||||||
|
import ImageToImageStrength from 'features/parameters/components/Parameters/ImageToImage/ImageToImageStrength';
|
||||||
|
import ParamSeedFull from 'features/parameters/components/Parameters/Seed/ParamSeedFull';
|
||||||
|
import { generationSelector } from 'features/parameters/store/generationSelectors';
|
||||||
|
import { uiSelector } from 'features/ui/store/uiSelectors';
|
||||||
|
import { memo } from 'react';
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
[uiSelector, generationSelector],
|
[uiSelector, generationSelector],
|
||||||
@ -41,7 +42,7 @@ const ImageToImageTabCoreParameters = () => {
|
|||||||
>
|
>
|
||||||
{shouldUseSliders ? (
|
{shouldUseSliders ? (
|
||||||
<>
|
<>
|
||||||
<ParamSchedulerAndModel />
|
<ParamModelandVAE />
|
||||||
<Box pt={2}>
|
<Box pt={2}>
|
||||||
<ParamSeedFull />
|
<ParamSeedFull />
|
||||||
</Box>
|
</Box>
|
||||||
@ -58,7 +59,8 @@ const ImageToImageTabCoreParameters = () => {
|
|||||||
<ParamSteps />
|
<ParamSteps />
|
||||||
<ParamCFGScale />
|
<ParamCFGScale />
|
||||||
</Flex>
|
</Flex>
|
||||||
<ParamSchedulerAndModel />
|
<ParamModelandVAE />
|
||||||
|
<ParamScheduler />
|
||||||
<Box pt={2}>
|
<Box pt={2}>
|
||||||
<ParamSeedFull />
|
<ParamSeedFull />
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
|
|
||||||
import ParamSteps from 'features/parameters/components/Parameters/Core/ParamSteps';
|
|
||||||
import ParamCFGScale from 'features/parameters/components/Parameters/Core/ParamCFGScale';
|
|
||||||
import ParamWidth from 'features/parameters/components/Parameters/Core/ParamWidth';
|
|
||||||
import ParamHeight from 'features/parameters/components/Parameters/Core/ParamHeight';
|
|
||||||
import { Box, Flex, useDisclosure } from '@chakra-ui/react';
|
import { Box, Flex, useDisclosure } from '@chakra-ui/react';
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { uiSelector } from 'features/ui/store/uiSelectors';
|
import { useAppSelector } from 'app/store/storeHooks';
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
import { memo } from 'react';
|
|
||||||
import ParamSchedulerAndModel from 'features/parameters/components/Parameters/Core/ParamSchedulerAndModel';
|
|
||||||
import IAICollapse from 'common/components/IAICollapse';
|
import IAICollapse from 'common/components/IAICollapse';
|
||||||
|
import ParamCFGScale from 'features/parameters/components/Parameters/Core/ParamCFGScale';
|
||||||
|
import ParamHeight from 'features/parameters/components/Parameters/Core/ParamHeight';
|
||||||
|
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
|
||||||
|
import ParamModelandVAE from 'features/parameters/components/Parameters/Core/ParamModelandVAE';
|
||||||
|
import ParamScheduler from 'features/parameters/components/Parameters/Core/ParamScheduler';
|
||||||
|
import ParamSteps from 'features/parameters/components/Parameters/Core/ParamSteps';
|
||||||
|
import ParamWidth from 'features/parameters/components/Parameters/Core/ParamWidth';
|
||||||
import ParamSeedFull from 'features/parameters/components/Parameters/Seed/ParamSeedFull';
|
import ParamSeedFull from 'features/parameters/components/Parameters/Seed/ParamSeedFull';
|
||||||
|
import { uiSelector } from 'features/ui/store/uiSelectors';
|
||||||
|
import { memo } from 'react';
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
uiSelector,
|
uiSelector,
|
||||||
@ -37,7 +38,7 @@ const TextToImageTabCoreParameters = () => {
|
|||||||
>
|
>
|
||||||
{shouldUseSliders ? (
|
{shouldUseSliders ? (
|
||||||
<>
|
<>
|
||||||
<ParamSchedulerAndModel />
|
<ParamModelandVAE />
|
||||||
<Box pt={2}>
|
<Box pt={2}>
|
||||||
<ParamSeedFull />
|
<ParamSeedFull />
|
||||||
</Box>
|
</Box>
|
||||||
@ -54,7 +55,8 @@ const TextToImageTabCoreParameters = () => {
|
|||||||
<ParamSteps />
|
<ParamSteps />
|
||||||
<ParamCFGScale />
|
<ParamCFGScale />
|
||||||
</Flex>
|
</Flex>
|
||||||
<ParamSchedulerAndModel />
|
<ParamModelandVAE />
|
||||||
|
<ParamScheduler />
|
||||||
<Box pt={2}>
|
<Box pt={2}>
|
||||||
<ParamSeedFull />
|
<ParamSeedFull />
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
import { memo } from 'react';
|
|
||||||
import { Box, Flex, useDisclosure } from '@chakra-ui/react';
|
import { Box, Flex, useDisclosure } from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { uiSelector } from 'features/ui/store/uiSelectors';
|
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
import { useAppSelector } from 'app/store/storeHooks';
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
|
|
||||||
import ParamSteps from 'features/parameters/components/Parameters/Core/ParamSteps';
|
|
||||||
import ParamCFGScale from 'features/parameters/components/Parameters/Core/ParamCFGScale';
|
|
||||||
import ImageToImageStrength from 'features/parameters/components/Parameters/ImageToImage/ImageToImageStrength';
|
|
||||||
import ParamSchedulerAndModel from 'features/parameters/components/Parameters/Core/ParamSchedulerAndModel';
|
|
||||||
import ParamBoundingBoxWidth from 'features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxWidth';
|
|
||||||
import ParamBoundingBoxHeight from 'features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxHeight';
|
|
||||||
import ParamSeedFull from 'features/parameters/components/Parameters/Seed/ParamSeedFull';
|
|
||||||
import IAICollapse from 'common/components/IAICollapse';
|
import IAICollapse from 'common/components/IAICollapse';
|
||||||
|
import ParamBoundingBoxHeight from 'features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxHeight';
|
||||||
|
import ParamBoundingBoxWidth from 'features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxWidth';
|
||||||
|
import ParamCFGScale from 'features/parameters/components/Parameters/Core/ParamCFGScale';
|
||||||
|
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
|
||||||
|
import ParamModelandVAE from 'features/parameters/components/Parameters/Core/ParamModelandVAE';
|
||||||
|
import ParamScheduler from 'features/parameters/components/Parameters/Core/ParamScheduler';
|
||||||
|
import ParamSteps from 'features/parameters/components/Parameters/Core/ParamSteps';
|
||||||
|
import ImageToImageStrength from 'features/parameters/components/Parameters/ImageToImage/ImageToImageStrength';
|
||||||
|
import ParamSeedFull from 'features/parameters/components/Parameters/Seed/ParamSeedFull';
|
||||||
|
import { uiSelector } from 'features/ui/store/uiSelectors';
|
||||||
|
import { memo } from 'react';
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
uiSelector,
|
uiSelector,
|
||||||
@ -38,7 +39,7 @@ const UnifiedCanvasCoreParameters = () => {
|
|||||||
>
|
>
|
||||||
{shouldUseSliders ? (
|
{shouldUseSliders ? (
|
||||||
<>
|
<>
|
||||||
<ParamSchedulerAndModel />
|
<ParamModelandVAE />
|
||||||
<Box pt={2}>
|
<Box pt={2}>
|
||||||
<ParamSeedFull />
|
<ParamSeedFull />
|
||||||
</Box>
|
</Box>
|
||||||
@ -55,7 +56,8 @@ const UnifiedCanvasCoreParameters = () => {
|
|||||||
<ParamSteps />
|
<ParamSteps />
|
||||||
<ParamCFGScale />
|
<ParamCFGScale />
|
||||||
</Flex>
|
</Flex>
|
||||||
<ParamSchedulerAndModel />
|
<ParamModelandVAE />
|
||||||
|
<ParamScheduler />
|
||||||
<Box pt={2}>
|
<Box pt={2}>
|
||||||
<ParamSeedFull />
|
<ParamSeedFull />
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
Reference in New Issue
Block a user