"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "a75fdd4180683f7953d97ebbcc92d24682690f96"
Unverified Commit a65ca8a0 authored by Dhruv Nair's avatar Dhruv Nair Committed by GitHub
Browse files

Fix failing tests due to Posix Path (#6627)

update
parent 5ca062e0
...@@ -519,10 +519,10 @@ def export_to_video(video_frames: List[np.ndarray], output_video_path: str = Non ...@@ -519,10 +519,10 @@ def export_to_video(video_frames: List[np.ndarray], output_video_path: str = Non
def load_hf_numpy(path) -> np.ndarray: def load_hf_numpy(path) -> np.ndarray:
if not path.startswith("http://") or path.startswith("https://"): base_url = "https://huggingface.co/datasets/fusing/diffusers-testing/resolve/main"
path = Path(
"https://huggingface.co/datasets/fusing/diffusers-testing/resolve/main", urllib.parse.quote(path) if not path.startswith("http://") and not path.startswith("https://"):
).as_posix() path = os.path.join(base_url, urllib.parse.quote(path))
return load_numpy(path) return load_numpy(path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment