mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 09:10:25 +08:00
fix: no attribute 'FILE_LIKE'' & update instructions
This commit is contained in:
1
rvc/utils/__init__.py
Normal file
1
rvc/utils/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .io import FileLike
|
||||
10
rvc/utils/io.py
Normal file
10
rvc/utils/io.py
Normal file
@@ -0,0 +1,10 @@
|
||||
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]]
|
||||
Reference in New Issue
Block a user