Skip to content

Commit 550fbde

Browse files
fix(ui): more types fixes
1 parent a01cd7c commit 550fbde

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelBaseBadge.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const BASE_COLOR_MAP: Record<BaseModelType, string> = {
1717
flux: 'gold',
1818
cogview4: 'red',
1919
imagen3: 'pink',
20+
'chatgpt-4o': 'pink',
2021
};
2122

2223
const ModelBaseBadge = ({ base }: Props) => {

invokeai/frontend/web/src/features/parameters/types/constants.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { ComboboxOption } from '@invoke-ai/ui-library';
2+
import type { BaseModelType } from 'services/api/types';
23

34
/**
45
* Mapping of base model to human readable name
56
*/
6-
export const MODEL_TYPE_MAP = {
7+
export const MODEL_TYPE_MAP: Record<BaseModelType, string> = {
78
any: 'Any',
89
'sd-1': 'Stable Diffusion 1.x',
910
'sd-2': 'Stable Diffusion 2.x',
@@ -13,12 +14,13 @@ export const MODEL_TYPE_MAP = {
1314
flux: 'FLUX',
1415
cogview4: 'CogView4',
1516
imagen3: 'Imagen3',
17+
'chatgpt-4o': 'ChatGPT 4o',
1618
};
1719

1820
/**
1921
* Mapping of base model to (short) human readable name
2022
*/
21-
export const MODEL_TYPE_SHORT_MAP = {
23+
export const MODEL_TYPE_SHORT_MAP: Record<BaseModelType, string> = {
2224
any: 'Any',
2325
'sd-1': 'SD1.X',
2426
'sd-2': 'SD2.X',
@@ -28,12 +30,13 @@ export const MODEL_TYPE_SHORT_MAP = {
2830
flux: 'FLUX',
2931
cogview4: 'CogView4',
3032
imagen3: 'Imagen3',
33+
'chatgpt-4o': 'ChatGPT 4o',
3134
};
3235

3336
/**
3437
* Mapping of base model to CLIP skip parameter constraints
3538
*/
36-
export const CLIP_SKIP_MAP = {
39+
export const CLIP_SKIP_MAP: Record<BaseModelType, { maxClip: number; markers: number[] }> = {
3740
any: {
3841
maxClip: 0,
3942
markers: [],
@@ -70,6 +73,10 @@ export const CLIP_SKIP_MAP = {
7073
maxClip: 0,
7174
markers: [],
7275
},
76+
'chatgpt-4o': {
77+
maxClip: 0,
78+
markers: [],
79+
},
7380
};
7481

7582
/**

0 commit comments

Comments
 (0)