Skip to content

Commit

Permalink
tests: check for full paths in sha test
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Apr 29, 2024
1 parent 8a8ca6a commit 3b89c8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/model_managers/test_shared_model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ def test_check_sha(
continue
if not (".pt" in path or ".ckpt" in path or ".safetensors" in path):
continue
model_manager.get_file_sha256_hash(f"{model_manager.model_folder_path}/{path}")
# Check if `path` is already a full path
if os.path.isabs(path):
model_manager.get_file_sha256_hash(path)
else:
model_manager.get_file_sha256_hash(f"{model_manager.model_folder_path}/{path}")

def test_check_validate_all_available_models(
self,
Expand Down

0 comments on commit 3b89c8a

Please sign in to comment.