fix(download): accept Diffusion Model file type when selecting primary file from CivitAI metadata

CivitAI returns file type "Diffusion Model" for checkpoint files (e.g., Anima
models), but the file selection logic only accepted "Model" and "Negative",
causing "No suitable file found in metadata" errors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Will Miao
2026-04-30 11:54:14 +08:00
parent 25605c5e78
commit 1d035361a4
2 changed files with 3 additions and 3 deletions

View File

@@ -1364,7 +1364,7 @@ class DownloadManager:
f
for f in files
if f.get("primary")
and f.get("type") in ("Model", "Negative")
and f.get("type") in ("Model", "Negative", "Diffusion Model")
),
None,
)
@@ -1395,7 +1395,7 @@ class DownloadManager:
(
f
for f in files
if f.get("primary") and f.get("type") in ("Model", "Negative")
if f.get("primary") and f.get("type") in ("Model", "Negative", "Diffusion Model")
),
None,
)