feat: show model size in model list

This commit is contained in:
Kevin Turner
2025-04-04 16:36:48 -07:00
committed by psychedelicious
parent 9d869fc9ce
commit bcfc61b2d7
3 changed files with 6 additions and 0 deletions

View File

@@ -108,6 +108,9 @@ const ModelListItem = ({ model }: ModelListItemProps) => {
<ModelBaseBadge base={model.base} />
<ModelFormatBadge format={model.format} />
</Flex>
<Text>
{Intl.NumberFormat(undefined, { maximumFractionDigits: 2 }).format(model.size / (1024 ** 3))} GB
</Text>
</Flex>
<IconButton
onClick={onClickDeleteButton}

View File

@@ -50,6 +50,8 @@ export const ModelView = memo(({ modelConfig }: Props) => {
<ModelAttrView label={t('modelManager.modelType')} value={modelConfig.type} />
<ModelAttrView label={t('common.format')} value={modelConfig.format} />
<ModelAttrView label={t('modelManager.path')} value={modelConfig.path} />
<ModelAttrView label={t('modelManager.size')}
value={Intl.NumberFormat(undefined, { maximumFractionDigits: 2 }).format(modelConfig.size / (1024 ** 3)) + ' GB'} />
{modelConfig.type === 'main' && (
<ModelAttrView label={t('modelManager.variant')} value={modelConfig.variant} />
)}