Aitron Emper commited on
Upload 50 files
Browse filesFiles changed (4)
136 unmodified lines1371381391401411421 unmodified line1441451461471481491508 unmodified lines159160161162163164165136 unmodified linesreturn x_pad, x_query, x_center, x_maxdef max_vram_gpu(gpu):if torch.cuda.is_available():gpu_properties = torch.cuda.get_device_properties(gpu)1 unmodified linereturn total_memory_gbelse:return "0"def get_gpu_info():ngpu = torch.cuda.device_count()gpu_infos = []8 unmodified linesif len(gpu_infos) > 0:gpu_info = "\n".join(gpu_infos)else:gpu_info = ("Unfortunately, there is no compatible GPU available to support your training.")return gpu_info136 unmodified lines1371381391401411421431 unmodified line1451461471481491501511528 unmodified lines161162163164165136 unmodified linesreturn x_pad, x_query, x_center, x_maxdef max_vram_gpu(gpu):if torch.cuda.is_available():gpu_properties = torch.cuda.get_device_properties(gpu)1 unmodified linereturn total_memory_gbelse:return "0"def get_gpu_info():ngpu = torch.cuda.device_count()gpu_infos = []8 unmodified linesif len(gpu_infos) > 0:gpu_info = "\n".join(gpu_infos)else:gpu_info = "Unfortunately, there is no compatible GPU available to support your training."return gpu_info
47 unmodified lines48495051525354555647 unmodified linestorch_device = (torch.device(f"cuda:{torch_device_index % torch.cuda.device_count()}")if torch.cuda.is_available()else torch.device("mps")if torch.backends.mps.is_available()else torch.device("cpu"))audio = torch.from_numpy(x.astype(np.float32)).to(torch_device, copy=True)47 unmodified lines484950515253545556575847 unmodified linestorch_device = (torch.device(f"cuda:{torch_device_index % torch.cuda.device_count()}")if torch.cuda.is_available()else (torch.device("mps")if torch.backends.mps.is_available()else torch.device("cpu")))audio = torch.from_numpy(x.astype(np.float32)).to(torch_device, copy=True)
12345import torchdef feature_loss(fmap_r, fmap_g):loss = 0for dr, dg in zip(fmap_r, fmap_g):123456import torchdef feature_loss(fmap_r, fmap_g):loss = 0for dr, dg in zip(fmap_r, fmap_g):
1234563 unmodified lines10111213import osimport torchdef change_info(path, info, name):try:ckpt = torch.load(path, map_location="cpu")3 unmodified linestorch.save(ckpt, f"logs/{name}/{name}")return "Success."except Exception as error:print(error)12345673 unmodified lines11121314import osimport torchdef change_info(path, info, name):try:ckpt = torch.load(path, map_location="cpu")3 unmodified linestorch.save(ckpt, f"logs/{name}/{name}")return "Success."except Exception as error:print(error)
rvc/configs/config.py+5-5
rvc/train/extract/extract_f0_print.py+5-3
rvc/train/losses.py+1
rvc/train/process/change_info.py+2-1