|
|
|
|
|
|
|
|
for i in range(retry + 1): |
|
|
for i in range(retry + 1): |
|
|
if curl: |
|
|
if curl: |
|
|
s = 'sS' if threads > 1 else '' # silent |
|
|
s = 'sS' if threads > 1 else '' # silent |
|
|
r = os.system(f"curl -{s}L '{url}' -o '{f}' --retry 9 -C -") # curl download |
|
|
|
|
|
|
|
|
r = os.system(f'curl -{s}L "{url}" -o "{f}" --retry 9 -C -') # curl download with retry, continue |
|
|
success = r == 0 |
|
|
success = r == 0 |
|
|
else: |
|
|
else: |
|
|
torch.hub.download_url_to_file(url, f, progress=threads == 1) # torch download |
|
|
torch.hub.download_url_to_file(url, f, progress=threads == 1) # torch download |