Skip to content

Commit a65ca8a

Browse files
authored
Fix failing tests due to Posix Path (huggingface#6627)
update
1 parent 5ca062e commit a65ca8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/diffusers/utils/testing_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,10 @@ def export_to_video(video_frames: List[np.ndarray], output_video_path: str = Non
519519

520520

521521
def load_hf_numpy(path) -> np.ndarray:
522-
if not path.startswith("http://") or path.startswith("https://"):
523-
path = Path(
524-
"https://huggingface.co/datasets/fusing/diffusers-testing/resolve/main", urllib.parse.quote(path)
525-
).as_posix()
522+
base_url = "https://huggingface.co/datasets/fusing/diffusers-testing/resolve/main"
523+
524+
if not path.startswith("http://") and not path.startswith("https://"):
525+
path = os.path.join(base_url, urllib.parse.quote(path))
526526

527527
return load_numpy(path)
528528

0 commit comments

Comments
 (0)