mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): improved model node ui
This commit is contained in:
parent
adfdb02c1b
commit
667d4deeb7
@ -92,6 +92,7 @@ const ControlNetModelInputFieldComponent = (
|
||||
error={!selectedModel}
|
||||
data={data}
|
||||
onChange={handleValueChanged}
|
||||
sx={{ width: '100%' }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -101,8 +101,10 @@ const LoRAModelInputFieldComponent = (
|
||||
item.label?.toLowerCase().includes(value.toLowerCase().trim()) ||
|
||||
item.value.toLowerCase().includes(value.toLowerCase().trim())
|
||||
}
|
||||
error={!selectedLoRAModel}
|
||||
onChange={handleChange}
|
||||
sx={{
|
||||
width: '100%',
|
||||
'.mantine-Select-dropdown': {
|
||||
width: '16rem !important',
|
||||
},
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
import { SelectItem } from '@mantine/core';
|
||||
import { useAppDispatch } from 'app/store/storeHooks';
|
||||
import IAIMantineSearchableSelect from 'common/components/IAIMantineSearchableSelect';
|
||||
import { fieldRefinerModelValueChanged } from 'features/nodes/store/nodesSlice';
|
||||
import {
|
||||
FieldComponentProps,
|
||||
SDXLRefinerModelInputFieldTemplate,
|
||||
SDXLRefinerModelInputFieldValue,
|
||||
FieldComponentProps,
|
||||
} from 'features/nodes/types/types';
|
||||
import { MODEL_TYPE_MAP } from 'features/parameters/types/constants';
|
||||
import { modelIdToMainModelParam } from 'features/parameters/util/modelIdToMainModelParam';
|
||||
@ -101,20 +101,17 @@ const RefinerModelInputFieldComponent = (
|
||||
value={selectedModel?.id}
|
||||
placeholder={data.length > 0 ? 'Select a model' : 'No models available'}
|
||||
data={data}
|
||||
error={data.length === 0}
|
||||
error={!selectedModel}
|
||||
disabled={data.length === 0}
|
||||
onChange={handleChangeModel}
|
||||
sx={{
|
||||
width: '100%',
|
||||
'.mantine-Select-dropdown': {
|
||||
width: '16rem !important',
|
||||
},
|
||||
}}
|
||||
/>
|
||||
{isSyncModelEnabled && (
|
||||
<Box mt={7}>
|
||||
<SyncModelsButton className="nodrag" iconMode />
|
||||
</Box>
|
||||
)}
|
||||
{isSyncModelEnabled && <SyncModelsButton className="nodrag" iconMode />}
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
@ -128,10 +128,11 @@ const ModelInputFieldComponent = (
|
||||
value={selectedModel?.id}
|
||||
placeholder={data.length > 0 ? 'Select a model' : 'No models available'}
|
||||
data={data}
|
||||
error={data.length === 0}
|
||||
error={!selectedModel}
|
||||
disabled={data.length === 0}
|
||||
onChange={handleChangeModel}
|
||||
sx={{
|
||||
width: '100%',
|
||||
'.mantine-Select-dropdown': {
|
||||
width: '16rem !important',
|
||||
},
|
||||
|
@ -93,8 +93,10 @@ const VaeModelInputFieldComponent = (
|
||||
data={data}
|
||||
onChange={handleChangeModel}
|
||||
disabled={data.length === 0}
|
||||
error={!selectedVaeModel}
|
||||
clearable
|
||||
sx={{
|
||||
width: '100%',
|
||||
'.mantine-Select-dropdown': {
|
||||
width: '16rem !important',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user