mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tweak(ui): add colors to base/format badges
This commit is contained in:
parent
2ca65ab9fa
commit
ff66779aa3
@ -7,9 +7,17 @@ type Props = {
|
||||
base: BaseModelType;
|
||||
};
|
||||
|
||||
const BASE_COLOR_MAP: Record<BaseModelType, string> = {
|
||||
any: 'base',
|
||||
'sd-1': 'green',
|
||||
'sd-2': 'teal',
|
||||
sdxl: 'invokeBlue',
|
||||
'sdxl-refiner': 'invokeBlue',
|
||||
};
|
||||
|
||||
const ModelBaseBadge = ({ base }: Props) => {
|
||||
return (
|
||||
<Badge flexGrow={0} colorScheme="invokeBlue" variant="subtle">
|
||||
<Badge flexGrow={0} colorScheme={BASE_COLOR_MAP[base]} variant="subtle">
|
||||
{MODEL_TYPE_SHORT_MAP[base]}
|
||||
</Badge>
|
||||
);
|
||||
|
@ -6,7 +6,7 @@ type Props = {
|
||||
format: AnyModelConfig['format'];
|
||||
};
|
||||
|
||||
const MODEL_FORMAT_NAME_MAP = {
|
||||
const FORMAT_NAME_MAP: Record<AnyModelConfig['format'], string> = {
|
||||
diffusers: 'diffusers',
|
||||
lycoris: 'lycoris',
|
||||
checkpoint: 'checkpoint',
|
||||
@ -15,10 +15,19 @@ const MODEL_FORMAT_NAME_MAP = {
|
||||
embedding_folder: 'embedding',
|
||||
};
|
||||
|
||||
const FORMAT_COLOR_MAP: Record<AnyModelConfig['format'], string> = {
|
||||
diffusers: 'base',
|
||||
lycoris: 'base',
|
||||
checkpoint: 'orange',
|
||||
invokeai: 'base',
|
||||
embedding_file: 'base',
|
||||
embedding_folder: 'base',
|
||||
};
|
||||
|
||||
const ModelFormatBadge = ({ format }: Props) => {
|
||||
return (
|
||||
<Badge flexGrow={0} colorScheme="base" variant="subtle">
|
||||
{MODEL_FORMAT_NAME_MAP[format]}
|
||||
<Badge flexGrow={0} colorScheme={FORMAT_COLOR_MAP[format]} variant="subtle">
|
||||
{FORMAT_NAME_MAP[format]}
|
||||
</Badge>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user