MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / getHuggingFaceSplatPaths

Function getHuggingFaceSplatPaths

src/hooks/urlLoaderPolicy.ts:391–415  ·  view source on GitHub ↗
(
  entries: readonly HuggingFaceDatasetTreeEntry[],
  treePath: string
)

Source from the content-addressed store, hash-verified

389}
390
391export function getHuggingFaceSplatPaths(
392 entries: readonly HuggingFaceDatasetTreeEntry[],
393 treePath: string
394): RemoteSplatCandidate[] {
395 const candidates: RemoteSplatCandidate[] = [];
396
397 for (const entry of entries) {
398 if (entry.type !== 'file' || typeof entry.path !== 'string' || typeof entry.size !== 'number') {
399 continue;
400 }
401
402 const relativePath = getRelativeHuggingFaceTreePath(entry.path, treePath);
403 if (!relativePath || !isSplatFilePath(relativePath)) {
404 continue;
405 }
406
407 if (!Number.isFinite(entry.size) || entry.size < 0) {
408 continue;
409 }
410
411 candidates.push({ path: relativePath, size: entry.size });
412 }
413
414 return sortRemoteSplatCandidates(candidates);
415}
416
417export function getPreferredHuggingFaceSplatPath(
418 entries: readonly HuggingFaceDatasetTreeEntry[],

Calls 3

isSplatFilePathFunction · 0.90

Tested by

no test coverage detected