fix: convert f-strings in find_model_files to .format()

This commit is contained in:
2025-11-22 16:20:12 +01:00
parent 38f8a04af6
commit e7a4daebe3

View File

@@ -323,11 +323,11 @@ filename_filter = sys.argv[3]
# Try both with and without 'hub/' subdirectory for compatibility
cache_path = Path(cache_dir)
repo_path = repo_id.replace('/', '--')
model_dir = cache_path / f'models--{repo_path}'
model_dir = cache_path / 'models--{0}'.format(repo_path)
# Fallback to hub/ subdirectory if direct path doesn't exist
if not model_dir.exists():
model_dir = cache_path / 'hub' / f'models--{repo_path}'
model_dir = cache_path / 'hub' / 'models--{0}'.format(repo_path)
if not model_dir.exists():
sys.exit(1)