mirror of
https://github.com/svc-develop-team/so-vits-svc.git
synced 2025-01-07 03:17:31 +08:00
Delete unused variables
This commit is contained in:
parent
d17df17044
commit
cd5492a147
2
.gitignore
vendored
2
.gitignore
vendored
@ -156,6 +156,7 @@ filelists/test.txt
|
||||
filelists/train.txt
|
||||
filelists/val.txt
|
||||
.idea/
|
||||
.vscode/
|
||||
.idea/modules.xml
|
||||
.idea/so-vits-svc.iml
|
||||
.idea/vcs.xml
|
||||
@ -168,3 +169,4 @@ pretrain/vec-256-layer-9.onnx
|
||||
pretrain/vec-256-layer-12.onnx
|
||||
pretrain/vec-768-layer-9.onnx
|
||||
.vscode/launch.json
|
||||
.ruff.toml
|
||||
|
@ -1,4 +0,0 @@
|
||||
select = ["E", "F", "I"]
|
||||
|
||||
# Never enforce `E501` (line length violations).
|
||||
ignore = ["E501"]
|
6
.vscode/extensions.json
vendored
6
.vscode/extensions.json
vendored
@ -1,6 +0,0 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"charliermarsh.ruff",
|
||||
"ms-python.python"
|
||||
]
|
||||
}
|
@ -131,7 +131,6 @@ class AudioDataset(Dataset):
|
||||
with open(filelists,"r") as f:
|
||||
self.paths = f.read().splitlines()
|
||||
for name_ext in tqdm(self.paths, total=len(self.paths)):
|
||||
os.path.splitext(name_ext)[0]
|
||||
path_audio = name_ext
|
||||
duration = librosa.get_duration(filename = path_audio, sr = self.sample_rate)
|
||||
|
||||
|
@ -581,9 +581,6 @@ class GaussianDiffusion(nn.Module):
|
||||
plms_noise_stage = torch.tensor(0, dtype=torch.long, device=device)
|
||||
noise_list = torch.zeros((0, 1, 1, self.mel_bins, n_frames), device=device)
|
||||
|
||||
ot = step_range[0]
|
||||
torch.full((1,), ot, device=device, dtype=torch.long)
|
||||
|
||||
for t in step_range:
|
||||
t_1 = torch.full((1,), t, device=device, dtype=torch.long)
|
||||
noise_pred = self.denoise_fn(x, t_1, cond)
|
||||
|
@ -557,7 +557,6 @@ class DPM_Solver:
|
||||
x_t: A pytorch tensor. The approximated solution at time `t`.
|
||||
"""
|
||||
ns = self.noise_schedule
|
||||
x.dim()
|
||||
lambda_s, lambda_t = ns.marginal_lambda(s), ns.marginal_lambda(t)
|
||||
h = lambda_t - lambda_s
|
||||
log_alpha_s, log_alpha_t = ns.marginal_log_mean_coeff(s), ns.marginal_log_mean_coeff(t)
|
||||
|
@ -121,7 +121,6 @@ class Unit2Mel(nn.Module):
|
||||
hubert_hidden_size = self.input_channel
|
||||
n_frames = 10
|
||||
hubert = torch.randn((1, n_frames, hubert_hidden_size))
|
||||
torch.arange(end=n_frames).unsqueeze(0).long()
|
||||
f0 = torch.randn((1, n_frames))
|
||||
volume = torch.randn((1, n_frames))
|
||||
spks = {}
|
||||
|
@ -130,7 +130,6 @@ def main():
|
||||
"Characters": spklist
|
||||
}
|
||||
|
||||
json.dumps(MoeVSConf)
|
||||
with open(f"checkpoints/{path}.json", 'w') as MoeVsConfFile:
|
||||
json.dump(MoeVSConf, MoeVsConfFile, indent = 4)
|
||||
|
||||
|
@ -201,8 +201,6 @@ class SineGen(torch.nn.Module):
|
||||
output uv: tensor(batchsize=1, length, 1)
|
||||
"""
|
||||
with torch.no_grad():
|
||||
torch.zeros(f0.shape[0], f0.shape[1], self.dim,
|
||||
device=f0.device)
|
||||
# fundamental component
|
||||
fn = torch.multiply(f0, torch.FloatTensor([[range(1, self.harmonic_num + 2)]]).to(f0.device))
|
||||
|
||||
|
@ -214,8 +214,6 @@ class SineGen(torch.nn.Module):
|
||||
output uv: tensor(batchsize=1, length, 1)
|
||||
"""
|
||||
with torch.no_grad():
|
||||
torch.zeros(f0.shape[0], f0.shape[1], self.dim,
|
||||
device=f0.device)
|
||||
# fundamental component
|
||||
fn = torch.multiply(f0, torch.FloatTensor([[range(1, self.harmonic_num + 2)]]).to(f0.device))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user