diff --git a/app/_modules/AdvancedOptionsPanel/LoraSelect/modals/LoraSearchDetailsCard.tsx b/app/_modules/AdvancedOptionsPanel/LoraSelect/modals/LoraSearchDetailsCard.tsx index deba5a8a..76468611 100644 --- a/app/_modules/AdvancedOptionsPanel/LoraSelect/modals/LoraSearchDetailsCard.tsx +++ b/app/_modules/AdvancedOptionsPanel/LoraSelect/modals/LoraSearchDetailsCard.tsx @@ -104,6 +104,22 @@ export default function LoraSearchDetailsCard({ } } + const formatSize = (size: number) => { + // Regular workers are limited to 220mb, but some workers have relaxed requirements. + // Eventually, there should be a warning in UI for this. + var pow=0 + var out=size; + while (out > 1024) { + out = out / 1024 + pow += 1 + } + if (size > 220 * 1024 * 1024) { + return "" + out.toFixed(2) + ["k","m","g"][pow] + "b" + } else { + return out.toFixed(2) + ["k","m","g"][pow] + "b" + } + } + const getImage = useCallback(() => { let image = null const { modelVersions = [] } = embedding @@ -197,12 +213,19 @@ export default function LoraSearchDetailsCard({ <>
{option.label}
- Baseline: {formatBaseline(version?.baseModel)} + Baseline: {formatBaseline(version?.baseModel)}
+ Size: {formatSize(version?.sizeKb)}
) } else { - return
{option.label}
+ return ( +
+ {option.label}
+ Size: {formatSize(version?.sizeKb)}
+ NSFW: {embedding.nsfw ? "True" : "False")} +
+ ) } }} options={versionOptions}