mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 19:15:04 +08:00
Merge pull request #1410 from RVC-Project/dev
chore(sync): merge dev into main
This commit is contained in:
commit
5e22271924
@ -23,16 +23,14 @@ try:
|
||||
|
||||
if torch.xpu.is_available():
|
||||
from infer.modules.ipex import ipex_init
|
||||
|
||||
ipex_init()
|
||||
|
||||
from torch.xpu.amp import autocast
|
||||
from infer.modules.ipex.gradscaler import gradscaler_init
|
||||
from torch.xpu.amp import autocast
|
||||
|
||||
GradScaler = gradscaler_init()
|
||||
ipex_init()
|
||||
else:
|
||||
from torch.cuda.amp import GradScaler, autocast
|
||||
except Exception: # pylint: disable=broad-exception-caught
|
||||
except Exception:
|
||||
from torch.cuda.amp import GradScaler, autocast
|
||||
|
||||
torch.backends.cudnn.deterministic = False
|
||||
@ -106,11 +104,10 @@ def main():
|
||||
os.environ["MASTER_ADDR"] = "localhost"
|
||||
os.environ["MASTER_PORT"] = str(randint(20000, 55555))
|
||||
children = []
|
||||
logger = utils.get_logger(hps.model_dir)
|
||||
for i in range(n_gpus):
|
||||
subproc = mp.Process(
|
||||
target=run,
|
||||
args=(i, n_gpus, hps, logger),
|
||||
args=(i, n_gpus, hps),
|
||||
)
|
||||
children.append(subproc)
|
||||
subproc.start()
|
||||
@ -119,10 +116,14 @@ def main():
|
||||
children[i].join()
|
||||
|
||||
|
||||
def run(rank, n_gpus, hps, logger: logging.Logger):
|
||||
def run(
|
||||
rank,
|
||||
n_gpus,
|
||||
hps,
|
||||
):
|
||||
global global_step
|
||||
if rank == 0:
|
||||
# logger = utils.get_logger(hps.model_dir)
|
||||
logger = utils.get_logger(hps.model_dir)
|
||||
logger.info(hps)
|
||||
# utils.check_git_hash(hps.model_dir)
|
||||
writer = SummaryWriter(log_dir=hps.model_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user