mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): pass base/type when installing models, add flux formats to MM badges
This commit is contained in:
parent
400eb94d3b
commit
b8486379ce
@ -12,10 +12,18 @@ type Props = {
|
|||||||
export const StarterModelsResultItem = memo(({ result }: Props) => {
|
export const StarterModelsResultItem = memo(({ result }: Props) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const allSources = useMemo(() => {
|
const allSources = useMemo(() => {
|
||||||
const _allSources = [{ source: result.source, config: { name: result.name, description: result.description } }];
|
const _allSources = [
|
||||||
|
{
|
||||||
|
source: result.source,
|
||||||
|
config: { name: result.name, description: result.description, type: result.type, base: result.base },
|
||||||
|
},
|
||||||
|
];
|
||||||
if (result.dependencies) {
|
if (result.dependencies) {
|
||||||
for (const d of result.dependencies) {
|
for (const d of result.dependencies) {
|
||||||
_allSources.push({ source: d.source, config: { name: d.name, description: d.description } });
|
_allSources.push({
|
||||||
|
source: d.source,
|
||||||
|
config: { name: d.name, description: d.description, type: d.type, base: d.base },
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _allSources;
|
return _allSources;
|
||||||
|
@ -13,7 +13,7 @@ const BASE_COLOR_MAP: Record<BaseModelType, string> = {
|
|||||||
'sd-2': 'teal',
|
'sd-2': 'teal',
|
||||||
sdxl: 'invokeBlue',
|
sdxl: 'invokeBlue',
|
||||||
'sdxl-refiner': 'invokeBlue',
|
'sdxl-refiner': 'invokeBlue',
|
||||||
flux: 'invokeBlue',
|
flux: 'gold',
|
||||||
};
|
};
|
||||||
|
|
||||||
const ModelBaseBadge = ({ base }: Props) => {
|
const ModelBaseBadge = ({ base }: Props) => {
|
||||||
|
@ -13,6 +13,9 @@ const FORMAT_NAME_MAP: Record<AnyModelConfig['format'], string> = {
|
|||||||
invokeai: 'internal',
|
invokeai: 'internal',
|
||||||
embedding_file: 'embedding',
|
embedding_file: 'embedding',
|
||||||
embedding_folder: 'embedding',
|
embedding_folder: 'embedding',
|
||||||
|
t5_encoder: 't5_encoder',
|
||||||
|
t5_encoder_8b: 't5_encoder_8b',
|
||||||
|
bnb_quantized_nf4b: 'quantized',
|
||||||
};
|
};
|
||||||
|
|
||||||
const FORMAT_COLOR_MAP: Record<AnyModelConfig['format'], string> = {
|
const FORMAT_COLOR_MAP: Record<AnyModelConfig['format'], string> = {
|
||||||
@ -22,6 +25,9 @@ const FORMAT_COLOR_MAP: Record<AnyModelConfig['format'], string> = {
|
|||||||
invokeai: 'base',
|
invokeai: 'base',
|
||||||
embedding_file: 'base',
|
embedding_file: 'base',
|
||||||
embedding_folder: 'base',
|
embedding_folder: 'base',
|
||||||
|
t5_encoder: 'base',
|
||||||
|
t5_encoder_8b: 'base',
|
||||||
|
bnb_quantized_nf4b: 'base',
|
||||||
};
|
};
|
||||||
|
|
||||||
const ModelFormatBadge = ({ format }: Props) => {
|
const ModelFormatBadge = ({ format }: Props) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user