-
-
- General Information
-
-
-
- {analysis.general.name && (
-
- )}
- {analysis.general.parameterCount && (
-
- )}
-
- {analysis.architecture.layers && (
-
- )}
- {analysis.architecture.expertCount && (
-
- )}
-
-
-
- {analysis.context.maxContextLength && (
- <>
-
-
-
- Context
-
-
-
-
-
- >
+
+ {analysis.general.name && (
+
)}
+
+ {analysis.general.parameterCount && (
+
+ )}
+
-
-
-
-
- Memory Estimates
-
-
-
-
- {analysis.estimates.vramPerLayer && (
-
- )}
-
-
+ {analysis.architecture.expertCount && (
+
+ )}
+ {analysis.context.maxContextLength && (
+
+ )}
+ {analysis.architecture.layers && (
+
+ )}
+ {!analysis.architecture.layers && (
+
+ )}
+
)}
diff --git a/src/components/screens/Launch/ModelFileField.tsx b/src/components/screens/Launch/ModelFileField.tsx
index 03becb5..e4b0de2 100644
--- a/src/components/screens/Launch/ModelFileField.tsx
+++ b/src/components/screens/Launch/ModelFileField.tsx
@@ -46,8 +46,6 @@ export const ModelFileField = ({
return undefined;
};
- const isLocalFile = value.trim() && validationState === 'local';
-
const handleAnalyzeModel = async () => {
if (!value.trim()) return;
@@ -99,7 +97,7 @@ export const ModelFileField = ({
)}
- {showAnalyze && isLocalFile && (
+ {showAnalyze && value.trim() && validationState !== 'invalid' && (
, key: string) {
export async function analyzeGGUFModel(filePath: string) {
try {
- const stats = await stat(filePath);
- const fileSize = stats.size;
+ const isUrl =
+ filePath.startsWith('http://') || filePath.startsWith('https://');
+
+ let fileSize: number;
+ if (isUrl) {
+ const response = await fetch(filePath, { method: 'HEAD' });
+ const contentLength = response.headers.get('content-length');
+ fileSize = contentLength ? parseInt(contentLength, 10) : 0;
+ } else {
+ const stats = await stat(filePath);
+ fileSize = stats.size;
+ }
const { metadata } = await gguf(filePath, {
- allowLocalFile: true,
+ allowLocalFile: !isUrl,
});
const metadataRecord = metadata as Record;