changed prompt_inject_noise to prompt_inject_noise_p so I can have another reason to do this post-training

This commit is contained in:
mrq 2024-12-19 19:28:50 -06:00
parent e7e7f48043
commit 53230efd74
2 changed files with 2 additions and 2 deletions

View File

@ -188,7 +188,7 @@ class Dataset:
prompt_similar_p: float = 0.75 # odds of sampling for a similar prompt instead of a random prompt
prompt_similar_top_k: int = 1 # top-k similar candidates to sample from
prompt_similar_top_k_offset: int = 0 # offset from the top-k to sample from
prompt_inject_noise: bool = False # adds noise to the input prompt waveform to try and vary things
prompt_inject_noise_p: float = 0.0 # adds noise to the input prompt waveform to try and vary things
resps_max_samples: int = 1 # number of samples to target for training
resps_append_p: float = 1.0 # probability to append another sample to the training target

View File

@ -1337,7 +1337,7 @@ class Dataset(_Dataset):
if task == "tts":
proms = self.sample_prompts(spkr_name, reference=path)
if cfg.dataset.prompt_inject_noise:
if random.random() < cfg.dataset.prompt_inject_noise_p:
# sample random noise
noise = self.sample_noise()
# extend the noise to fill the target audio