1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

Change path to posix (testing_utils.py) (#6803)

change path to pathlib as_posix

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
Stephen
2024-02-03 02:14:13 -05:00
committed by GitHub
parent 15ed53d272
commit 02338c9317

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 = os.path.join(base_url, urllib.parse.quote(path))
path = Path(base_url, urllib.parse.quote(path)).as_posix()
return load_numpy(path)