mirror of
https://github.com/Mangio621/Mangio-RVC-Fork.git
synced 2026-02-24 03:49:51 +01:00
cross-platform for preprocess support
This commit is contained in:
13
LazyImport.py
Normal file
13
LazyImport.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from importlib.util import find_spec, LazyLoader, module_from_spec
|
||||
from sys import modules
|
||||
|
||||
def lazyload(name):
|
||||
if name in modules:
|
||||
return modules[name]
|
||||
else:
|
||||
spec = find_spec(name)
|
||||
loader = LazyLoader(spec.loader)
|
||||
module = module_from_spec(spec)
|
||||
modules[name] = module
|
||||
loader.exec_module(module)
|
||||
return module
|
||||
2050
infer-web.py
2050
infer-web.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user