mirror of
https://github.com/open-mmlab/mim.git
synced 2025-06-03 14:59:11 +08:00
[Fix] Remove hash validation temporarily when downloading checkpoint
This commit is contained in:
parent
693815b427
commit
19c55eece1
@ -85,13 +85,11 @@ def download(package: str,
|
|||||||
checkpoint_urls = model_info[config]['weight']
|
checkpoint_urls = model_info[config]['weight']
|
||||||
for checkpoint_url in checkpoint_urls.split(','):
|
for checkpoint_url in checkpoint_urls.split(','):
|
||||||
filename = checkpoint_url.split('/')[-1]
|
filename = checkpoint_url.split('/')[-1]
|
||||||
hash_prefix = filename.split('.')[0].split('-')[-1]
|
|
||||||
checkpoint_path = osp.join(dest_root, filename)
|
checkpoint_path = osp.join(dest_root, filename)
|
||||||
if osp.exists(checkpoint_path):
|
if osp.exists(checkpoint_path):
|
||||||
echo_success(f'{filename} exists in {dest_root}')
|
echo_success(f'{filename} exists in {dest_root}')
|
||||||
else:
|
else:
|
||||||
download_from_file(checkpoint_url, checkpoint_path,
|
download_from_file(checkpoint_url, checkpoint_path)
|
||||||
hash_prefix)
|
|
||||||
|
|
||||||
echo_success(
|
echo_success(
|
||||||
f'Successfully downloaded {filename} to {dest_root}')
|
f'Successfully downloaded {filename} to {dest_root}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user