sgl-project/sglang · error · IntegrityError
No files found in HF repo {repo_id}.
Error message
No files found in HF repo {repo_id}. What it means
When building a manifest from an HF repo id (not a local path), the verifier lists repo files via huggingface_hub's filesystem, filters out non-model files (via _get_filename_and_info_from_hf_file returning None), and raises if nothing survives. It means the repo id resolved but yielded zero usable model files.
Source
Thrown at python/sglang/srt/utils/model_file_verifier.py:158
def _load_checksums(source: str) -> Manifest:
if Path(source).is_file():
data = json.loads(Path(source).read_text())
return Manifest.from_dict(data)
return Manifest(files=_load_file_infos_from_hf(repo_id=source))
def _load_file_infos_from_hf(*, repo_id: str) -> Dict[str, FileInfo]:
from huggingface_hub import HfFileSystem
fs = HfFileSystem()
files = fs.ls(repo_id, detail=True)
file_infos = dict(
r for r in map(lambda f: _get_filename_and_info_from_hf_file(fs, f), files) if r
)
if not file_infos:
raise IntegrityError(f"No files found in HF repo {repo_id}.")
return file_infos
def _get_filename_and_info_from_hf_file(
fs, file_info
) -> Optional[Tuple[str, FileInfo]]:
if file_info.get("type") != "file":
return None
filename = Path(file_info.get("name", "")).name
if any(fnmatch.fnmatch(filename, pat) for pat in IGNORE_PATTERNS):
return None
size = file_info.get("size", -1)
lfs_info = file_info.get("lfs")
if lfs_info and "sha256" in lfs_info:
return filename, FileInfo(sha256=lfs_info["sha256"], size=size)View on GitHub (pinned to 0132848349)
Solutions
- Double-check the repo id and confirm it actually hosts model files (`huggingface-cli ls <repo_id>`).
- If files exist but are non-standard names/extensions, extend the file filter in _get_filename_and_info_from_hf_file.
- Use a local snapshot directory as source instead of a repo id.
Defensive patterns
Strategy: validation
Validate before calling
from huggingface_hub import HfApi
files = HfApi().list_repo_files(repo_id)
if not any(f.endswith((".safetensors", ".bin", ".json")) for f in files):
raise SystemExit(f"repo {repo_id} has no model files") Prevention
- Verify repo id with list_repo_files before checksum generation.
- Prefer local snapshots for offline pipelines.
When it happens
Trigger: Calling generate_checksums(source=<repo_id>) on a repo containing only non-qualifying files (e.g., just README/LOCK, .gitattributes) or a dataset/empty repo; also a typo'd repo id that still resolves.
Common situations: Wrong repo id (an empty placeholder repo), passing a dataset repo instead of a model repo, or all files being filtered out by the extension allowlist.
Related errors
- Integrity check failed: {joined errors}
- No model files found in {model_path}
- huggingface_hub is required to download Real-ESRGAN weights.
- Failed to download Real-ESRGAN weights from HuggingFace repo
- Model directory {model_path} is missing required component d
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/0469e34dd5729e74.
Report an issue: GitHub.