1
0
Fork 0

fix path ref

This commit is contained in:
Sean Sube 2023-03-07 23:54:32 -06:00
parent c0b88733b8
commit bc21165fd9
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 4 additions and 2 deletions

View File

@ -146,9 +146,11 @@ def fetch_model(
ext = path.basename(url.path) ext = path.basename(url.path)
_filename, ext = path.splitext(ext) _filename, ext = path.splitext(ext)
if ext is not None: if ext is not None:
cache_name += ext cache_name = cache_path + ext
else:
cache_name = cache_path
else: else:
cache_name = "%s.%s" % (cache_path, model_format) cache_name = f"{cache_path}.{model_format}"
if path.exists(cache_name): if path.exists(cache_name):
logger.debug("model already exists in cache, skipping fetch") logger.debug("model already exists in cache, skipping fetch")