mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 21:45:00 +03:00
bugfix remove module
This commit is contained in:
parent
b57ddc180c
commit
f02489a86f
@ -8,7 +8,8 @@ if sys.platform.startswith('darwin'):
|
||||
modulePath = os.path.join(baseDir[0], "MMVC_Client_v13", "python")
|
||||
sys.path.append(modulePath)
|
||||
else:
|
||||
sys.path.append("MMVC_Client_v13/python")
|
||||
modulePath = os.path.join("MMVC_Client_v13", "python")
|
||||
sys.path.append(modulePath)
|
||||
|
||||
|
||||
from dataclasses import dataclass, asdict
|
||||
@ -210,7 +211,7 @@ class MMVCv13:
|
||||
val = sys.modules.get(key)
|
||||
try:
|
||||
file_path = val.__file__
|
||||
if file_path.find("MMVC_Client_v13/python") >= 0:
|
||||
if file_path.find(remove_path + os.path.sep) >= 0:
|
||||
print("remove", key, file_path)
|
||||
sys.modules.pop(key)
|
||||
except Exception as e:
|
||||
|
@ -8,7 +8,8 @@ if sys.platform.startswith('darwin'):
|
||||
modulePath = os.path.join(baseDir[0], "MMVC_Client_v15", "python")
|
||||
sys.path.append(modulePath)
|
||||
else:
|
||||
sys.path.append("MMVC_Client_v15/python")
|
||||
modulePath = os.path.join("MMVC_Client_v15", "python")
|
||||
sys.path.append(modulePath)
|
||||
|
||||
from dataclasses import dataclass, asdict
|
||||
import numpy as np
|
||||
@ -257,7 +258,7 @@ class MMVCv15:
|
||||
val = sys.modules.get(key)
|
||||
try:
|
||||
file_path = val.__file__
|
||||
if file_path.find("MMVC_Client_v15/python") >= 0:
|
||||
if file_path.find(remove_path + os.path.sep) >= 0:
|
||||
print("remove", key, file_path)
|
||||
sys.modules.pop(key)
|
||||
except Exception as e:
|
||||
|
@ -288,7 +288,7 @@ class RVC:
|
||||
val = sys.modules.get(key)
|
||||
try:
|
||||
file_path = val.__file__
|
||||
if file_path.find("RVC/") >= 0:
|
||||
if file_path.find("RVC" + os.path.sep) >= 0:
|
||||
print("remove", key, file_path)
|
||||
sys.modules.pop(key)
|
||||
except Exception as e:
|
||||
|
@ -361,7 +361,7 @@ class SoVitsSvc40:
|
||||
val = sys.modules.get(key)
|
||||
try:
|
||||
file_path = val.__file__
|
||||
if file_path.find("so-vits-svc-40/") >= 0:
|
||||
if file_path.find("so-vits-svc-40" + os.path.sep) >= 0:
|
||||
print("remove", key, file_path)
|
||||
sys.modules.pop(key)
|
||||
except Exception as e:
|
||||
|
@ -325,7 +325,7 @@ class SoVitsSvc40v2:
|
||||
val = sys.modules.get(key)
|
||||
try:
|
||||
file_path = val.__file__
|
||||
if file_path.find("so-vits-svc-40v2/") >= 0:
|
||||
if file_path.find("so-vits-svc-40v2" + os.path.sep) >= 0:
|
||||
print("remove", key, file_path)
|
||||
sys.modules.pop(key)
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user