1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Fix posix path issue in testing utils (#6849)

update
This commit is contained in:
Dhruv Nair
2024-02-05 08:57:18 +05:30
committed by GitHub
parent c6f8c310c3
commit fdf55b1f1c

View File

@@ -522,7 +522,7 @@ def load_hf_numpy(path) -> np.ndarray:
base_url = "https://huggingface.co/datasets/fusing/diffusers-testing/resolve/main"
if not path.startswith("http://") and not path.startswith("https://"):
path = Path(base_url, urllib.parse.quote(path)).as_posix()
path = os.path.join(base_url, urllib.parse.quote(path))
return load_numpy(path)