Repository navigation
Conversation
…nloads A local import is now a download whose bytes are already on disk. - model_library::source_identification searches backwards from local files to their repository: the caller's claim, GGUF embedded repo and base-model URLs (and their -GGUF siblings), and Hugging Face search by the original file names nominate candidates. A candidate is confirmed only when every weight file equals a published LFS file by SHA-256 at a resolved commit. Byte-identical mirrors are reported as ambiguous; truncated, partial and name-only matches always require confirmation; offline is unavailable. - plan_model_import (read-only) builds the exact-files download a user would have made, resolves its selection and destination, and reports which files are local, truncated or missing. - start_source_import rebuilds the plan, seeds the download destination with the verified local bytes and runs the ordinary download at that commit, so finalization writes a download record. Missing files are fetched only with consent (fetch_missing) and are named when it is withheld. - reidentify_imported_models re-identifies existing records in place from their recorded digests and original names; dry run by default. - The file lookup and refetch now use the reverse search. Refetch never derives a repo from the model ID's family segment; name matches always require confirmation. Finished downloads no longer stay pending_online_lookup. Each 0.8.0 lookup bug has a regression test; an integration test compares an import with a download of the same files field by field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
The import wizard no longer derives repository IDs from embedded GGUF metadata or forwards a match that needs confirmation. It renders the backend's plan_model_import result, offers one consent control for fetching files a verified copy lacks, and imports verified single files through start_source_import; everything else stays a copied import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
Rebase the plan on current main, record the slices as implemented, the live acceptance evidence against the real Hub, and the decisions left to the owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
# Conflicts: # CHANGELOG.md
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
[Medium impact] The changes affect local model imports and several source-metadata workflows. Fix premature import success and the handling of local companions before merging. Findings
SummaryThe PR identifies local model sources by SHA-256 and seeds ordinary downloads with verified local weights. It adds planning, source-import, and re-identification APIs, plus wizard consent controls.
MrScripty explicitly defers truncated-file resume, wizard ingestion of directories and sharded sets, automatic lookup jobs, historical revision searches, applying repairs to the real library, and hint-less model placement. The plan also acknowledges the crash gap between seeding and download admission; none is reported as a finding.
|
- Identical local copies map to distinct published files, preferring each file's own original path, so seeding never creates one path twice. - A local LFS companion whose bytes equal its published SHA-256 is seeded instead of being reported missing; files published without a SHA-256 are still fetched, because the download verifies them by transfer. - A re-identification dry run no longer registers pending task mappings, and its report lists every changed field; any change is what gets saved. - The wizard reports a source import as a started download instead of a finished import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
# Conflicts: # CHANGELOG.md
Summary
This implements
docs/plans/import-via-download/plan.md. A local import is now a download whose bytes are already on disk.model_library::source_identification). Candidates come from the caller's claim, GGUFgeneral.repo_url/general.source.*, GGUFgeneral.base_model.*and their-GGUFsiblings, and Hugging Face search by the original file names.mainresolves to.plan_model_importis read-only. It builds the exact-filesDownloadRequesta user would have made, prepares it at that commit, and resolves the same file selection a download makes (payload, shards, companions). It reports each file as local, truncated or missing, and gives the model ID, artifact ID and destination.start_source_importrebuilds the plan in the backend.fetch_missing). Without consent the import is refused and the missing files are named.reidentify_imported_models(dry run by default) repairs existing copied imports in place. It works from their recorded digests and original names and applies only byte-confirmed sources.owner/namefrom the model ID's family segment.pending_online_lookup: true.extractEmbeddedRepoId/buildEmbeddedMetadataMatch;plan_model_import, with one consent checkbox for fetching missing files;start_source_import.API for the GUI redesign and RPC consumers (additive)
plan_model_import{items: [{path, repo_id?}]}{success, plans: ModelImportPlan[]}:identification {status, source?, candidates[], local_files[], embedded_metadata, reasons[]},package? {repo_id, revision, requested_files, model_id, selected_artifact_id, model_type, destination, files[{repo_path, size, sha256, state: local|truncated|missing, local_path}], missing_files, missing_bytes, existing_model_id},ingest: download|copy,requires_fetch_consent,reasons[]start_source_import{path, repo_id, revision?, fetch_missing}{success, import: {download_id, model_id, repo_id, revision, ingested_files, fetched_files}}. Track completion like any download.reidentify_imported_models{model_ids?: string[], dry_run?: bool (default true)}{success, report: {dry_run, items: [{model_id, identification, changes: {field: [old, new]}, applied, reasons}]}}The TS types are in
frontend/src/types/api-import.ts.lookup_hf_metadata_for_filekeeps its shape. It now returnshash/1.0 only for confirmed bytes, andrequires_confirmation: truefor anything weaker.Acceptance evidence
import_of_published_bytes_equals_a_download_of_themcompares the import's wholemetadata.jsonwith a download's, ignoring timestamps. It also checks that the weights were not transferred again and thatREADME.mdwas fetched only with consent.Qwen3-Reranker-0.6B.Q8_0.gguf, read only. With no claim, it was confirmed asmradermacher/Qwen3-Reranker-0.6B-GGUF@6727da81by SHA-256.LiquidAI/LFM3-Audio-2B-GGUF@39670cb5, for both the Q4_0 GGUF and the mmproj. The safetensors original and 8 other LFM3 repositories were checked and do not publish these bytes.ggml-org/Qwen3-Reranker-0.6B-Q8_0-GGUF@a02f48bb. Six mirrors publish identical bytes; the recorded claim chose ggml-org. Without it the result isambiguous, by design.cargo test -p pumas-library --lib: 2212 passed.cargo test -p pumas-rpc: 485 + 30 passed.-D warningspasses, both workspace-default and the CI feature set.check:types,lint, model-import vitest.validate,lint,test(304 passed).Decisions pending owner (see plan)
D2 diffusers/sharded sets stay copy imports. D3 no automatic pending-lookup job. D4 only
main's commit is compared. D5 apply re-identification to the real library. D6 placement of hint-less downloads (unknown/<owner>).Not done
S4b: a truncated local file is reported and then fetched whole (with consent); it is not yet resumed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe