mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 09:10:25 +08:00
11 lines
276 B
Python
11 lines
276 B
Python
import os
|
|
from typing import Union, IO
|
|
import torch
|
|
|
|
if hasattr(torch.serialization, "FILE_LIKE"):
|
|
FileLike = torch.serialization.FILE_LIKE
|
|
elif hasattr(torch.types, "FILE_LIKE"):
|
|
FileLike = torch.types.FileLike
|
|
else:
|
|
FileLike = Union[str, os.PathLike, IO[bytes]]
|