@nodetool-ai/huggingface 0.7.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifact-inspector.d.ts +48 -0
- package/dist/artifact-inspector.d.ts.map +1 -0
- package/dist/artifact-inspector.js +455 -0
- package/dist/artifact-inspector.js.map +1 -0
- package/dist/hf-auth.d.ts +36 -0
- package/dist/hf-auth.d.ts.map +1 -0
- package/dist/hf-auth.js +138 -0
- package/dist/hf-auth.js.map +1 -0
- package/dist/hf-cache.d.ts +94 -0
- package/dist/hf-cache.d.ts.map +1 -0
- package/dist/hf-cache.js +520 -0
- package/dist/hf-cache.js.map +1 -0
- package/dist/hf-download-manager.d.ts +51 -0
- package/dist/hf-download-manager.d.ts.map +1 -0
- package/dist/hf-download-manager.js +285 -0
- package/dist/hf-download-manager.js.map +1 -0
- package/dist/hf-downloader.d.ts +48 -0
- package/dist/hf-downloader.d.ts.map +1 -0
- package/dist/hf-downloader.js +140 -0
- package/dist/hf-downloader.js.map +1 -0
- package/dist/hf-file-info.d.ts +24 -0
- package/dist/hf-file-info.d.ts.map +1 -0
- package/dist/hf-file-info.js +35 -0
- package/dist/hf-file-info.js.map +1 -0
- package/dist/hf-hub-search.d.ts +51 -0
- package/dist/hf-hub-search.d.ts.map +1 -0
- package/dist/hf-hub-search.js +181 -0
- package/dist/hf-hub-search.js.map +1 -0
- package/dist/hf-models.d.ts +222 -0
- package/dist/hf-models.d.ts.map +1 -0
- package/dist/hf-models.js +1530 -0
- package/dist/hf-models.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/llama-cpp-download.d.ts +58 -0
- package/dist/llama-cpp-download.d.ts.map +1 -0
- package/dist/llama-cpp-download.js +204 -0
- package/dist/llama-cpp-download.js.map +1 -0
- package/dist/safetensor-layout.d.ts +45 -0
- package/dist/safetensor-layout.d.ts.map +1 -0
- package/dist/safetensor-layout.js +129 -0
- package/dist/safetensor-layout.js.map +1 -0
- package/dist/safetensors-inspector.d.ts +33 -0
- package/dist/safetensors-inspector.d.ts.map +1 -0
- package/dist/safetensors-inspector.js +613 -0
- package/dist/safetensors-inspector.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HuggingFace Hub model search.
|
|
3
|
+
*
|
|
4
|
+
* Translates nodetool model types into `@huggingface/hub` `listModels` queries.
|
|
5
|
+
* Translation between nodetool's hf.* types and HF Hub query parameters lives
|
|
6
|
+
* in `HF_HUB_QUERY_CONFIG` below, with fallbacks for GENERIC_HF_TYPES (require
|
|
7
|
+
* a --task) and llama.cpp-style model types enumerated in SUPPORTED_MODEL_TYPES.
|
|
8
|
+
*/
|
|
9
|
+
import { listModels } from "@huggingface/hub";
|
|
10
|
+
import { resolveHfToken } from "./hf-auth.js";
|
|
11
|
+
import { GENERIC_HF_TYPES, HF_SEARCH_TYPE_CONFIG, SUPPORTED_MODEL_TYPES } from "./hf-models.js";
|
|
12
|
+
/**
|
|
13
|
+
* Direct nodetool-type → HF Hub API query mapping.
|
|
14
|
+
*
|
|
15
|
+
* Only populated for types where the translation differs from
|
|
16
|
+
* `HF_SEARCH_TYPE_CONFIG`. For hf.* types without an entry here, we derive
|
|
17
|
+
* params from HF_SEARCH_TYPE_CONFIG at runtime.
|
|
18
|
+
*/
|
|
19
|
+
const HF_HUB_QUERY_CONFIG = {
|
|
20
|
+
// llama.cpp GGUF types: post-filter by library_name (not tags) to match the
|
|
21
|
+
// HF API's `library=gguf` parameter which filters on the library_name field.
|
|
22
|
+
qwen2: { query: "qwen2", libraryName: "gguf" },
|
|
23
|
+
qwen3: { query: "qwen3", libraryName: "gguf" },
|
|
24
|
+
qwen_2_5_vl: { query: "qwen2.5-vl", libraryName: "gguf" },
|
|
25
|
+
qwen_3_vl: { query: "qwen3-vl", libraryName: "gguf" },
|
|
26
|
+
mistral3: { query: "mistral", libraryName: "gguf" },
|
|
27
|
+
gpt_oss: { query: "gpt-oss", libraryName: "gguf" },
|
|
28
|
+
llama: { query: "llama", libraryName: "gguf" },
|
|
29
|
+
gemma2: { query: "gemma-2", libraryName: "gguf" },
|
|
30
|
+
gemma3: { query: "gemma-3", libraryName: "gguf" },
|
|
31
|
+
gemma3n: { query: "gemma-3n", libraryName: "gguf" },
|
|
32
|
+
phi3: { query: "phi-3", libraryName: "gguf" },
|
|
33
|
+
phi4: { query: "phi-4", libraryName: "gguf" }
|
|
34
|
+
};
|
|
35
|
+
/** Build HF Hub API query params from HF_SEARCH_TYPE_CONFIG for hf.* types. */
|
|
36
|
+
function deriveFromSearchConfig(modelType) {
|
|
37
|
+
const cfg = HF_SEARCH_TYPE_CONFIG[modelType];
|
|
38
|
+
if (!cfg)
|
|
39
|
+
return null;
|
|
40
|
+
const out = {};
|
|
41
|
+
const pipelineTags = cfg["pipeline_tag"];
|
|
42
|
+
if (Array.isArray(pipelineTags) && pipelineTags.length > 0) {
|
|
43
|
+
out.task = pipelineTags[0];
|
|
44
|
+
}
|
|
45
|
+
const tagFilters = cfg["tag"];
|
|
46
|
+
if (Array.isArray(tagFilters) && tagFilters.length > 0) {
|
|
47
|
+
// Strip "*" wildcards — HF Hub API takes literal tags.
|
|
48
|
+
const concrete = tagFilters
|
|
49
|
+
.map((t) => t.replace(/\*/g, "").trim())
|
|
50
|
+
.filter((t) => t.length > 0);
|
|
51
|
+
if (concrete.length > 0)
|
|
52
|
+
out.tags = concrete;
|
|
53
|
+
}
|
|
54
|
+
const repoPatterns = cfg["repo_pattern"];
|
|
55
|
+
if (Array.isArray(repoPatterns) && !out.query) {
|
|
56
|
+
const first = repoPatterns.find((p) => !p.startsWith("*") && !p.endsWith("*") && !p.includes("*"));
|
|
57
|
+
if (first)
|
|
58
|
+
out.query = first;
|
|
59
|
+
else {
|
|
60
|
+
// Take the first pattern, stripping wildcards.
|
|
61
|
+
const cleaned = repoPatterns[0]?.replace(/\*/g, "").trim();
|
|
62
|
+
if (cleaned)
|
|
63
|
+
out.query = cleaned;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return Object.keys(out).length > 0 ? out : null;
|
|
67
|
+
}
|
|
68
|
+
function buildQueryParams(modelType, task) {
|
|
69
|
+
const normalized = modelType.toLowerCase();
|
|
70
|
+
if (GENERIC_HF_TYPES.has(normalized)) {
|
|
71
|
+
if (!task) {
|
|
72
|
+
throw new Error(`Model type '${modelType}' requires --task (e.g. 'text-to-image').`);
|
|
73
|
+
}
|
|
74
|
+
return { task: task.replace(/_/g, "-") };
|
|
75
|
+
}
|
|
76
|
+
if (task) {
|
|
77
|
+
return { task: task.replace(/_/g, "-") };
|
|
78
|
+
}
|
|
79
|
+
const direct = HF_HUB_QUERY_CONFIG[normalized];
|
|
80
|
+
if (direct)
|
|
81
|
+
return direct;
|
|
82
|
+
const derived = deriveFromSearchConfig(normalized);
|
|
83
|
+
if (derived)
|
|
84
|
+
return derived;
|
|
85
|
+
throw new Error(`Unknown model type '${modelType}'. Run 'nodetool models hf-types' to list supported types.`);
|
|
86
|
+
}
|
|
87
|
+
// ---------------------------------------------------------------------------
|
|
88
|
+
// Search
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
/**
|
|
91
|
+
* Search the HuggingFace Hub for models matching a nodetool model type.
|
|
92
|
+
*/
|
|
93
|
+
export async function searchHfHub(options) {
|
|
94
|
+
const params = buildQueryParams(options.modelType, options.task);
|
|
95
|
+
const token = options.token !== undefined
|
|
96
|
+
? options.token
|
|
97
|
+
: await resolveHfToken(undefined);
|
|
98
|
+
const libraryFilter = params.libraryName?.toLowerCase();
|
|
99
|
+
const out = [];
|
|
100
|
+
try {
|
|
101
|
+
for await (const m of listModels({
|
|
102
|
+
search: {
|
|
103
|
+
...(params.query ? { query: params.query } : {}),
|
|
104
|
+
...(params.task ? { task: params.task } : {}),
|
|
105
|
+
...(params.tags ? { tags: params.tags } : {})
|
|
106
|
+
},
|
|
107
|
+
...(options.limit && !libraryFilter ? { limit: options.limit } : {}),
|
|
108
|
+
additionalFields: ["tags", "library_name"],
|
|
109
|
+
...(token ? { accessToken: token } : {})
|
|
110
|
+
})) {
|
|
111
|
+
if (libraryFilter && m.library_name?.toLowerCase() !== libraryFilter) {
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
const lastModified = m.updatedAt && !Number.isNaN(m.updatedAt.getTime())
|
|
115
|
+
? m.updatedAt.toISOString()
|
|
116
|
+
: undefined;
|
|
117
|
+
out.push({
|
|
118
|
+
id: m.name,
|
|
119
|
+
pipeline_tag: m.task ?? null,
|
|
120
|
+
tags: m.tags ?? [],
|
|
121
|
+
downloads: m.downloads,
|
|
122
|
+
likes: m.likes,
|
|
123
|
+
gated: m.gated,
|
|
124
|
+
private: m.private,
|
|
125
|
+
library_name: m.library_name ?? null,
|
|
126
|
+
...(lastModified ? { last_modified: lastModified } : {}),
|
|
127
|
+
model_type: options.modelType,
|
|
128
|
+
repo_id: m.name
|
|
129
|
+
});
|
|
130
|
+
if (options.limit && out.length >= options.limit)
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
throw new Error(`HF Hub search failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
136
|
+
}
|
|
137
|
+
return out;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Iterate SUPPORTED_MODEL_TYPES, search each, aggregate, dedupe by id, limit.
|
|
141
|
+
* Skips types that require a task when none is given.
|
|
142
|
+
*/
|
|
143
|
+
export async function listAllHfModels(options = {}) {
|
|
144
|
+
const { limit, token, repoOnly } = options;
|
|
145
|
+
// Use a per-type cap when an overall limit is set so we don't pull way more
|
|
146
|
+
// than needed up-front. Still dedupe + final-cap later.
|
|
147
|
+
const perTypeLimit = limit ? Math.max(limit, 50) : undefined;
|
|
148
|
+
const seen = new Set();
|
|
149
|
+
const aggregated = [];
|
|
150
|
+
for (const modelType of SUPPORTED_MODEL_TYPES) {
|
|
151
|
+
if (GENERIC_HF_TYPES.has(modelType.toLowerCase()))
|
|
152
|
+
continue;
|
|
153
|
+
try {
|
|
154
|
+
const results = await searchHfHub({
|
|
155
|
+
modelType,
|
|
156
|
+
...(perTypeLimit ? { limit: perTypeLimit } : {}),
|
|
157
|
+
...(token !== undefined ? { token } : {})
|
|
158
|
+
});
|
|
159
|
+
for (const m of results) {
|
|
160
|
+
if (!m.id || seen.has(m.id))
|
|
161
|
+
continue;
|
|
162
|
+
seen.add(m.id);
|
|
163
|
+
aggregated.push(m);
|
|
164
|
+
if (limit && aggregated.length >= limit)
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
if (limit && aggregated.length >= limit)
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
// One type failing shouldn't tank the whole list. Log + continue.
|
|
172
|
+
console.error(`listAllHfModels: ${modelType} failed — ${String(err)}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
let out = aggregated;
|
|
176
|
+
if (repoOnly) {
|
|
177
|
+
out = out.filter((m) => m.id.split("/").length <= 2);
|
|
178
|
+
}
|
|
179
|
+
return out;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=hf-hub-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hf-hub-search.js","sourceRoot":"","sources":["../src/hf-hub-search.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAyDxB;;;;;;GAMG;AACH,MAAM,mBAAmB,GAAqC;IAC5D,4EAA4E;IAC5E,6EAA6E;IAC7E,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO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AG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Offline-first Hugging Face model discovery and typing utilities.
|
|
3
|
+
*
|
|
4
|
+
* Ported from the Python `huggingface_models.py`.
|
|
5
|
+
*
|
|
6
|
+
* The workflow implemented here follows a predictable sequence:
|
|
7
|
+
* 1. Enumerate cached repositories and snapshots via `HfFastCache` without hitting the hub.
|
|
8
|
+
* 2. Read lightweight metadata (sizes, filenames, artifacts) from the local snapshot to
|
|
9
|
+
* build `UnifiedModel` records for repos and individual files.
|
|
10
|
+
* 3. Infer model type and task:
|
|
11
|
+
* - Use local `model_index.json` / `config.json` parsing and artifact inspection
|
|
12
|
+
* so we can classify models even when offline or gated.
|
|
13
|
+
* 4. Provide targeted search helpers (by hf.* type, repo/file patterns, artifact hints).
|
|
14
|
+
* 5. Expose convenience lookups for common runtimes (llama.cpp GGUF).
|
|
15
|
+
*
|
|
16
|
+
* Wherever possible, the code avoids expensive I/O and network calls, preferring cached
|
|
17
|
+
* information and shallow file inspections to keep UI interactions fast and reliable.
|
|
18
|
+
*/
|
|
19
|
+
export interface UnifiedModel {
|
|
20
|
+
id: string;
|
|
21
|
+
type: string | null;
|
|
22
|
+
name: string;
|
|
23
|
+
repo_id: string | null;
|
|
24
|
+
path: string | null;
|
|
25
|
+
artifact_family?: string | null;
|
|
26
|
+
artifact_component?: string | null;
|
|
27
|
+
artifact_confidence?: number | null;
|
|
28
|
+
artifact_evidence?: string[] | null;
|
|
29
|
+
cache_path?: string | null;
|
|
30
|
+
allow_patterns?: string[] | null;
|
|
31
|
+
ignore_patterns?: string[] | null;
|
|
32
|
+
description?: string | null;
|
|
33
|
+
readme?: string | null;
|
|
34
|
+
downloaded?: boolean | null;
|
|
35
|
+
size_on_disk?: number | null;
|
|
36
|
+
pipeline_tag?: string | null;
|
|
37
|
+
tags?: string[] | null;
|
|
38
|
+
has_model_index?: boolean | null;
|
|
39
|
+
downloads?: number | null;
|
|
40
|
+
likes?: number | null;
|
|
41
|
+
trending_score?: number | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Extensions that identify repo-root single-file diffusion checkpoints we surface directly.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SINGLE_FILE_DIFFUSION_EXTENSIONS: readonly string[];
|
|
47
|
+
/**
|
|
48
|
+
* Tags that hint at single-file diffusion checkpoints when hub metadata is present.
|
|
49
|
+
*/
|
|
50
|
+
export declare const SINGLE_FILE_DIFFUSION_TAGS: ReadonlySet<string>;
|
|
51
|
+
/** Default globs used when scanning repos for general-purpose weight files. */
|
|
52
|
+
export declare const HF_DEFAULT_FILE_PATTERNS: readonly string[];
|
|
53
|
+
/** Extra globs for torch weights common in control/adapters. */
|
|
54
|
+
export declare const HF_PTH_FILE_PATTERNS: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* Known repo-id allowlists for supported model families.
|
|
57
|
+
* These repos are recognized for offline type matching without hub metadata.
|
|
58
|
+
*/
|
|
59
|
+
export declare const KNOWN_REPO_PATTERNS: Readonly<Record<string, readonly string[]>>;
|
|
60
|
+
/**
|
|
61
|
+
* Map hf.* types to repo-id allowlists so type matching can succeed offline.
|
|
62
|
+
*/
|
|
63
|
+
export declare const KNOWN_TYPE_REPO_MATCHERS: Record<string, string[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Base -> checkpoint variant mapping so heuristics propagate to single-file checkpoints.
|
|
66
|
+
*/
|
|
67
|
+
export declare const _CHECKPOINT_BASES: Readonly<Record<string, string>>;
|
|
68
|
+
/**
|
|
69
|
+
* Keyword hints across repo id/tags/paths to associate models with hf.* types.
|
|
70
|
+
*/
|
|
71
|
+
export declare const HF_TYPE_KEYWORD_MATCHERS: Record<string, string[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Map transformer architecture class names (from `config.json` `architectures` array)
|
|
74
|
+
* to hf.* types for offline model-type inference.
|
|
75
|
+
*/
|
|
76
|
+
export declare const _CONFIG_MODEL_TYPE_ARCHITECTURE_MAPPING: Readonly<Record<string, string>>;
|
|
77
|
+
/**
|
|
78
|
+
* Map transformer `model_type` values to hf.* types when configs are parsed offline.
|
|
79
|
+
*/
|
|
80
|
+
export declare const _CONFIG_MODEL_TYPE_MAPPING: Readonly<Record<string, string>>;
|
|
81
|
+
/**
|
|
82
|
+
* Diffusers pipeline class name -> hf.* type mapping.
|
|
83
|
+
*/
|
|
84
|
+
export declare const CLASSNAME_TO_MODEL_TYPE: Readonly<Record<string, string>>;
|
|
85
|
+
/**
|
|
86
|
+
* Hint describing how a HF repo should be presented to the user.
|
|
87
|
+
*
|
|
88
|
+
* - `REPO_BUNDLE` means treat the repo as a single installable unit (typical diffusers).
|
|
89
|
+
* - `PER_FILE` exposes individual weights (gguf, adapters, quant variants).
|
|
90
|
+
* - `UNKNOWN` indicates insufficient signal; callers can pick a sensible default.
|
|
91
|
+
*/
|
|
92
|
+
export declare enum RepoPackagingHint {
|
|
93
|
+
REPO_BUNDLE = "repo_bundle",
|
|
94
|
+
PER_FILE = "per_file",
|
|
95
|
+
UNKNOWN = "unknown"
|
|
96
|
+
}
|
|
97
|
+
/** Filenames/extensions used to decide whether weights belong to a bundle or per-file list. */
|
|
98
|
+
export declare const _WEIGHT_EXTENSIONS: readonly string[];
|
|
99
|
+
export declare const _INDEX_FILENAMES: ReadonlySet<string>;
|
|
100
|
+
/** Size/keyword thresholds that help spot adapters vs base weights. */
|
|
101
|
+
export declare const _SMALL_ADAPTER_MAX_BYTES: number;
|
|
102
|
+
export declare const _QUANT_MARKERS: readonly string[];
|
|
103
|
+
export declare const _ADAPTER_MARKERS: readonly string[];
|
|
104
|
+
/**
|
|
105
|
+
* Static search hints per hf.* type used to build repo/file queries (offline/hub).
|
|
106
|
+
*/
|
|
107
|
+
export declare const HF_SEARCH_TYPE_CONFIG: Record<string, Record<string, string[] | string>>;
|
|
108
|
+
export declare const HF_TYPE_STRUCTURAL_RULES: Readonly<Record<string, Record<string, boolean>>>;
|
|
109
|
+
export declare const GENERIC_HF_TYPES: ReadonlySet<string>;
|
|
110
|
+
export declare const SUPPORTED_MODEL_TYPES: readonly string[];
|
|
111
|
+
/** Case-sensitive glob check; empty pattern list means match everything. */
|
|
112
|
+
export declare function _matchesAnyPattern(value: string, patterns: string[]): boolean;
|
|
113
|
+
/** Case-insensitive glob check used when filtering by repo id. */
|
|
114
|
+
export declare function _matchesAnyPatternCi(value: string, patterns: string[]): boolean;
|
|
115
|
+
/** Lightweight check for weight-like filenames used by packaging heuristics. */
|
|
116
|
+
export declare function _isWeightFile(fileName: string): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Simplified bundle metadata detection (without ModelInfo).
|
|
119
|
+
* Returns false because we have no hub metadata in the offline-only path.
|
|
120
|
+
*/
|
|
121
|
+
export declare function _hasBundleMetadata(): boolean;
|
|
122
|
+
/** Return True if filenames match common sharded checkpoint patterns. */
|
|
123
|
+
export declare function _hasShardedWeights(weightFiles: readonly string[]): boolean;
|
|
124
|
+
/** Identify multiple quantized flavors of a model (gguf/ggml/awq/gptq/etc.). */
|
|
125
|
+
export declare function _hasQuantizedVariants(weightFiles: readonly string[]): boolean;
|
|
126
|
+
/** Flag repos containing small LoRA/adapter-like files instead of base weights. */
|
|
127
|
+
export declare function _hasAdapterCandidates(weightEntries: readonly [string, number][]): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Determine if a small set of weight files belong to the same family/variant.
|
|
130
|
+
*
|
|
131
|
+
* Useful to keep repos with a handful of shards/quantizations grouped together
|
|
132
|
+
* instead of forcing per-file selection.
|
|
133
|
+
*/
|
|
134
|
+
export declare function _allSameFamily(weightFiles: readonly string[]): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Guess whether a repo should be presented as a single bundle or per-file list.
|
|
137
|
+
*
|
|
138
|
+
* Simplified version without ModelInfo (no hub metadata).
|
|
139
|
+
*/
|
|
140
|
+
export declare function detectRepoPackaging(_repoId: string, fileEntries: readonly [string, number][]): RepoPackagingHint;
|
|
141
|
+
/**
|
|
142
|
+
* Heuristically detect raw checkpoint files (e.g. Stable Diffusion .safetensors)
|
|
143
|
+
* that live at the repo root inside the HF cache.
|
|
144
|
+
*
|
|
145
|
+
* Excludes standard model weight files that are part of multi-file repos:
|
|
146
|
+
* - model.safetensors, pytorch_model.bin, model.bin, model.pt, model.pth
|
|
147
|
+
*/
|
|
148
|
+
export declare function _isSingleFileDiffusionWeight(fileName: string): boolean;
|
|
149
|
+
/** Return true for files that might reveal diffusion components. */
|
|
150
|
+
export declare function _isDiffusionArtifactCandidate(fileName: string): boolean;
|
|
151
|
+
/** Return true when artifact inspection identifies diffusion components. */
|
|
152
|
+
export declare function _repoHasDiffusionArtifacts(repoId: string, snapshotDir: string | null, fileList: readonly string[]): Promise<boolean>;
|
|
153
|
+
/** Calculate total size and file entries for a repo, resolving paths. */
|
|
154
|
+
export declare function _calculateRepoStats(snapshotPath: string, fileList: readonly string[] | null): [number, [string, number][]];
|
|
155
|
+
/**
|
|
156
|
+
* Infer model type by reading cached config or model_index files when hub metadata
|
|
157
|
+
* is unavailable.
|
|
158
|
+
*
|
|
159
|
+
* The logic mirrors hub-side typing: prefer diffusers `_class_name`, fall back to
|
|
160
|
+
* `model_type`/`architectures` hints, and only touches local files that are already
|
|
161
|
+
* present in the snapshot.
|
|
162
|
+
*/
|
|
163
|
+
export declare function _inferModelTypeFromLocalConfigs(fileEntries: readonly [string, number][], snapshotDir: string | null): string | null;
|
|
164
|
+
/**
|
|
165
|
+
* Build the repo-level `UnifiedModel` plus per-file metadata for a cached HF repo.
|
|
166
|
+
*/
|
|
167
|
+
export declare function _buildCachedRepoEntry(repoId: string, repoDir: string, snapshotDir?: string | null, fileList?: string[] | null): Promise<[UnifiedModel, [string, number][]]>;
|
|
168
|
+
/**
|
|
169
|
+
* Enumerate all cached HF repos and return repo-level `UnifiedModel` entries.
|
|
170
|
+
*/
|
|
171
|
+
export declare function readCachedHfModels(): Promise<UnifiedModel[]>;
|
|
172
|
+
/** Get search configuration for a given hf.* type, or null if not found. */
|
|
173
|
+
export declare function _buildSearchConfigForType(modelType: string): Record<string, string[] | string> | null;
|
|
174
|
+
/**
|
|
175
|
+
* Infer a sensible HF pipeline tag from an hf.* type or explicit task override.
|
|
176
|
+
*/
|
|
177
|
+
export declare function _derivePipelineTag(normalizedType: string, task?: string | null): string | null;
|
|
178
|
+
/** Check if a repo id matches any hard-coded comfy-type mappings for a model type. */
|
|
179
|
+
export declare function _matchesRepoForType(normalizedType: string, repoId: string, repoIdFromId: string): boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Use lightweight artifact inspection hints (family/component) to match a model type.
|
|
182
|
+
*/
|
|
183
|
+
export declare function _matchesArtifactDetection(normalizedType: string, artifactFamily?: string | null, artifactComponent?: string | null): boolean;
|
|
184
|
+
/** Semantic match for hf.* types (no structural checks here). */
|
|
185
|
+
export declare function _matchesModelType(model: UnifiedModel, modelType: string): boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Search the local HF cache for repos/files using offline data only.
|
|
188
|
+
*/
|
|
189
|
+
export declare function searchCachedHfModels(repoPatterns?: readonly string[] | null, filenamePatterns?: readonly string[] | null): Promise<UnifiedModel[]>;
|
|
190
|
+
/**
|
|
191
|
+
* Return cached Hugging Face models matching a requested hf.* type.
|
|
192
|
+
*
|
|
193
|
+
* The search is entirely offline: build a search config, scan cached repos/files,
|
|
194
|
+
* then apply the same client-side heuristics (keyword matching, repo patterns,
|
|
195
|
+
* artifact hints) to label each result with the desired type.
|
|
196
|
+
*/
|
|
197
|
+
export declare function getModelsByHfType(modelType: string): Promise<UnifiedModel[]>;
|
|
198
|
+
/**
|
|
199
|
+
* Delete a model from the Hugging Face cache.
|
|
200
|
+
*/
|
|
201
|
+
export declare function deleteCachedHfModel(modelId: string): Promise<boolean>;
|
|
202
|
+
/** Build a lookup from flat GGUF filename to (repo_id, original_filename). */
|
|
203
|
+
export declare function _buildManifestLookup(cacheDir: string): Map<string, [string, string]>;
|
|
204
|
+
/**
|
|
205
|
+
* Parse a flat llama.cpp GGUF filename into (repo_id, repo_name, filename).
|
|
206
|
+
*
|
|
207
|
+
* Resolution order:
|
|
208
|
+
* 1. Exact match in manifest lookup (most reliable).
|
|
209
|
+
* 2. Heuristic split on the first underscore to obtain the HuggingFace org.
|
|
210
|
+
* 3. Fallback: return ("", "", entry).
|
|
211
|
+
*/
|
|
212
|
+
export declare function _parseGgufFlatFilename(entry: string, manifestLookup: Map<string, [string, string]>): [string, string, string];
|
|
213
|
+
/**
|
|
214
|
+
* Enumerate GGUF models in the llama.cpp native cache directory.
|
|
215
|
+
*
|
|
216
|
+
* llama.cpp uses a flat file structure:
|
|
217
|
+
* - {org}_{repo}_{filename}.gguf
|
|
218
|
+
* - {org}_{repo}_{filename}.gguf.etag
|
|
219
|
+
* - manifest={org}={repo}={tag}.json
|
|
220
|
+
*/
|
|
221
|
+
export declare function getLlamaCppModelsFromCache(): Promise<UnifiedModel[]>;
|
|
222
|
+
//# sourceMappingURL=hf-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hf-models.d.ts","sourceRoot":"","sources":["../src/hf-models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAeH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACpC,UAAU,CA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