Import folders without a Hub repo as local models
The Import form gets "Add as local model": every file in the folder, kept as it is, named after the folder. A new models.source column (hub | local) marks them; local models skip Hub checks, metadata, downloads, updates and deep verify, and Verify checks existence and size only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
90d6007b55
commit
80ccf800df
21 files changed
+1747
-39
No files matched your search
@@ -159,7 +159,8 @@ export class VerifyRunner implements Runner {
|
||||
// hf records the etag it downloaded; a different one means another version of the file.
|
||||
const meta = await readMetadata(dir, f.path);
|
||||
const etags = [f.lfsSha256, f.blobOid].filter(Boolean);
|
||||
return meta && !etags.includes(meta.etag) ? "hash_mismatch" : "present";
|
||||
// Local models (no Hub repo) have no etags to compare with: existence and size is all.
|
||||
return meta && etags.length > 0 && !etags.includes(meta.etag) ? "hash_mismatch" : "present";
|
||||
}
|
||||
const actual = await this.hash(full, f, onBytes);
|
||||
const expected = f.lfsSha256 ?? f.blobOid;
|
||||
|
||||
Reference in new issue
Block a user