Skip to content

Commit 8cd6940

Browse files
author
Kevin Turner
committed
feat: show model size in model list
1 parent 4951870 commit 8cd6940

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Diff for: invokeai/frontend/web/public/locales/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@
841841
"selectModel": "Select Model",
842842
"settings": "Settings",
843843
"simpleModelPlaceholder": "URL or path to a local file or diffusers folder",
844+
"size": "Size",
844845
"source": "Source",
845846
"sigLip": "SigLIP",
846847
"spandrelImageToImage": "Image to Image (Spandrel)",

Diff for: invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelListItem.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ const ModelListItem = ({ model }: ModelListItemProps) => {
108108
<ModelBaseBadge base={model.base} />
109109
<ModelFormatBadge format={model.format} />
110110
</Flex>
111+
<Text>
112+
{Intl.NumberFormat(undefined, { maximumFractionDigits: 2 }).format(model.size / (1024 ** 3))} GB
113+
</Text>
111114
</Flex>
112115
<IconButton
113116
onClick={onClickDeleteButton}

Diff for: invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/ModelView.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export const ModelView = memo(({ modelConfig }: Props) => {
5050
<ModelAttrView label={t('modelManager.modelType')} value={modelConfig.type} />
5151
<ModelAttrView label={t('common.format')} value={modelConfig.format} />
5252
<ModelAttrView label={t('modelManager.path')} value={modelConfig.path} />
53+
<ModelAttrView label={t('modelManager.size')}
54+
value={Intl.NumberFormat(undefined, { maximumFractionDigits: 2 }).format(modelConfig.size / (1024 ** 3)) + ' GB'} />
5355
{modelConfig.type === 'main' && (
5456
<ModelAttrView label={t('modelManager.variant')} value={modelConfig.variant} />
5557
)}

0 commit comments

Comments
 (0)