mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-08-25 06:45:29 +08:00
Update Win DLL Strategy
This commit is contained in:
parent
f27822af40
commit
5d8d9e3232
@ -147,6 +147,18 @@ def load_cudnn():
|
|||||||
if torch_lib_dir.exists():
|
if torch_lib_dir.exists():
|
||||||
os.add_dll_directory(str(torch_lib_dir))
|
os.add_dll_directory(str(torch_lib_dir))
|
||||||
print(f"[INFO] Added DLL directory: {torch_lib_dir}")
|
print(f"[INFO] Added DLL directory: {torch_lib_dir}")
|
||||||
|
pattern = str(torch_lib_dir / "cudnn_cnn*.so*")
|
||||||
|
matching_files = sorted(glob.glob(pattern))
|
||||||
|
if not matching_files:
|
||||||
|
print(f"[ERROR] No cudnn_cnn*.dll found in {torch_lib_dir}")
|
||||||
|
return
|
||||||
|
for dll_path in matching_files:
|
||||||
|
dll_name = os.path.basename(dll_path)
|
||||||
|
try:
|
||||||
|
ctypes.CDLL(dll_name)
|
||||||
|
print(f"[INFO] Loaded: {dll_name}")
|
||||||
|
except OSError as e:
|
||||||
|
print(f"[WARNING] Failed to load {dll_name}: {e}")
|
||||||
else:
|
else:
|
||||||
print(f"[WARNING] Torch lib directory not found: {torch_lib_dir}")
|
print(f"[WARNING] Torch lib directory not found: {torch_lib_dir}")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user