Import models that are already in the models folder
The worker scans MODELS_DIR (startup, every 2 min, on "Rescan") for <org>/<name> folders that no model uses and stores them in local_folders. The library lists them; Import opens Add model prefilled with the folder, the commit hf recorded and the files on disk preselected. The import job runs hf download into the existing folder: hf 2.1.1 hashes files it didn't download itself, keeps matching ones and re-downloads the rest (verified in Docker, including a corrupted file being replaced). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3603742637
commit
145818f149
16 files changed
+1418
-25
No files matched your search
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE `local_folders` (
|
||||
`path` text PRIMARY KEY NOT NULL,
|
||||
`files` text NOT NULL,
|
||||
`file_count` integer NOT NULL,
|
||||
`total_bytes` integer NOT NULL,
|
||||
`commit` text,
|
||||
`scanned_at` integer NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `worker_state` ADD `scan_requested_at` integer;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -57,6 +57,13 @@
|
||||
"when": 1791233230682,
|
||||
"tag": "0007_hub_state",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 8,
|
||||
"version": "6",
|
||||
"when": 1791233749207,
|
||||
"tag": "0008_local_folders",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user