Partial download surfaces as "Cannot detect the model type" rather than a download error
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- machine-learning
Direzione di ricerca
Inizia in diffsynth/core/loader/config.py, in download_if_necessary, quindi esamina diffsynth/models/model_loader.py:101, dove viene sollevato l’errore fuorviante. Riproduci o analizza il caricamento di un insieme incompleto di shard e confrontalo con un download completato. Il lavoro è completato quando i download interrotti producono un suggerimento utile relativo al download senza modificare il caricamento riuscito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A partially-failed download surfaces as Cannot detect the model type, which points at the model registry rather than at the download.
Setup: v2.1.6 at 4dbf980, Linux, 1×H100, pip install -e ., modelscope 1.39.1, downloading from ModelScope.
Running examples/qwen_image/model_inference/Qwen-Image-Distill-Full.py, some shards failed to fetch. The log says so:
2026-09-02 02:02:47,612 | WARNING | modelscope_hub.download | 4 file(s) failed to download
Loading models from: [
".../diffusion_pytorch_model-00003-of-00009.safetensors",
".../diffusion_pytorch_model-00004-of-00009.safetensors",
".../diffusion_pytorch_model-00001-of-00009.safetensors",
".../diffusion_pytorch_model-00007-of-00009.safetensors",
".../diffusion_pytorch_model-00009-of-00009.safetensors"
]
Loading continued with those 5 of 9 shards and failed with:
ValueError: Cannot detect the model type. File: [...5 shards...].
Model hash: fcc81cc37454f5cd5d5dc572f15bb3a9
Re-running the same script once the download completed worked and produced an image. Same commit, same script; the only difference was that all 9 shards were present.
As far as I can tell, download_if_necessary resolves the path with glob.glob(...) over whatever is on disk, and since hash_model_file covers the keys and shapes of the files it is given, an incomplete shard set hashes to a value that is genuinely not in model_configs.py. The error at model_loader.py:101 is then the "unknown model" one.
I realise a network failure isn't reproducible on demand, and that re-running is already the intended recovery (download() passes ignore_file_pattern=downloaded_files), which is exactly what worked for me. So the ask is small: would you accept a hint in the message, something like
raise ValueError(f"Cannot detect the model type. File: {path}. Model hash: {model_hash}. "
f"If the download was interrupted, some files may be missing; re-running will fetch them.")
or would you prefer a completeness check earlier, at the download step? I didn't want to guess, since this path is shared by every model family.
The current message appears in a few open issues (#1144, #1252, #1462). I haven't checked whether any of them share this cause.
- Lingua principale
- Python
- Stelle
- 13.1k
- Fork
- 1.3k
- Merge medio
- 13h 12m
- PR unite (30g)
- 45
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelscope/DiffSynth-Studio
-
bfloat16训练时段错误: 数组越界的一种方案 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelscope/DiffSynth-Studio#1499 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
modelscope/DiffSynth-Studio#1373 · 5 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
modelscope/DiffSynth-Studio#1691 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
modelscope/DiffSynth-Studio#1687 ·
-
FLUX LoRA Fine-Tuning: Border Outpainting and Pixel-Level Misalignment Issues in Image Editing Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
modelscope/DiffSynth-Studio#1685 · 1 commento ·
Tutte le issue di modelscope/DiffSynth-Studio
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
zostera/django-bootstrap4#894 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
use-agent-os/agent-os#3276 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#117848 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
zilliztech/memsearch#759 ·