Skip to content

Fix duplicate Civitai weight selection#257

Merged
PaulFidika merged 1 commit into
masterfrom
fix/civitai-primary-alternative
Jul 15, 2026
Merged

Fix duplicate Civitai weight selection#257
PaulFidika merged 1 commit into
masterfrom
fix/civitai-primary-alternative

Conversation

@PaulFidika

Copy link
Copy Markdown
Contributor

What changed

  • De-duplicate Civitai safetensors entries that share a destination filename, preserving primary-first selection.
  • Preserve distinct filenames for genuine multi-file bundles.
  • Add regression coverage and bump the package to 0.26.2.

Why

Civitai model version 2884631 advertises an fp16 primary and fp32 alternative under the same filename. The worker planned and downloaded both, overwrote the first with the second, and inflated disk preflight from about 18.2 GiB to 50.5 GiB. This made the live recovery ingest fail on a 10 GiB CPU pod before any CAS publish.

Validation

  • uv run --no-sync pytest -q tests/convert/test_civitai_gguf_select.py -k 'not ingest_civitai_gguf_classification' tests/convert/test_download_skip.py — 20 passed, 1 deselected.
  • Live Civitai metadata for model version 2884631 selects one primary file: 6,938,041,288 bytes.
  • Ruff on both touched Python files, HTTP-timeout guard, git diff --check, and uv build --offline pass.

Existing baseline failures

Untouched origin/master already has one GGUF fixture failure, five mypy errors, and uv sync --locked --extra dev currently fails because the mutable torch==2.13.0+cu130 wheel no longer matches the hashes recorded in uv.lock. This PR does not touch those paths or dependency hashes.

@PaulFidika PaulFidika marked this pull request as ready for review July 15, 2026 00:10
@PaulFidika PaulFidika merged commit 6b98011 into master Jul 15, 2026
1 check passed
@PaulFidika PaulFidika deleted the fix/civitai-primary-alternative branch July 15, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant