Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #117

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.5
hooks:
- id: codespell
files: ^.*\.(py|md|rst|yml)$
1 change: 1 addition & 0 deletions dictionaries/ipa/sequence_phonemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
phonemes_dict = yaml.safe_load(Path(__file__).with_name("symbols.yaml").open())
# print(phonemes_dict.keys())


# todo: add <bos>, <eos>, <pad>, <unk>, <bar> tokens
def text_to_sequence(text):
seq = []
Expand Down
16 changes: 12 additions & 4 deletions fish_diffusion/archs/diffsinger/diffusions/uni_pc.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,21 @@ def get_orders_and_timesteps_for_singlestep_solver(
if order == 3:
K = steps // 3 + 1
if steps % 3 == 0:
orders = [3,] * (
orders = [
3,
] * (
K - 2
) + [2, 1]
elif steps % 3 == 1:
orders = [3,] * (
orders = [
3,
] * (
K - 1
) + [1]
else:
orders = [3,] * (
orders = [
3,
] * (
K - 1
) + [2]
elif order == 2:
Expand All @@ -413,7 +419,9 @@ def get_orders_and_timesteps_for_singlestep_solver(
] * K
else:
K = steps // 2 + 1
orders = [2,] * (
orders = [
2,
] * (
K - 1
) + [1]
elif order == 1:
Expand Down
5 changes: 4 additions & 1 deletion fish_diffusion/modules/encoders/fast_speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,10 @@ def forward(self, x, encoder_padding_mask=None, **kwargs):
if self.num_heads > 0:
residual = x
x = self.layer_norm1(x)
x, _, = self.self_attn(
(
x,
_,
) = self.self_attn(
query=x, key=x, value=x, key_padding_mask=encoder_padding_mask
)
x = F.dropout(x, self.dropout, training=self.training)
Expand Down
2 changes: 1 addition & 1 deletion fish_diffusion/modules/vocoders/refinegan/mpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(
stride: int = 3,
use_spectral_norm: bool = False,
leaky_relu_slope: float = 0.2,
channels: Optional[list[int]] = None
channels: Optional[list[int]] = None,
) -> None:
super(DiscriminatorP, self).__init__()

Expand Down
1 change: 0 additions & 1 deletion fish_diffusion/modules/wavenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def __init__(self, d_encoder, residual_channels, use_linear_bias=False, dilation
)

def forward(self, x, conditioner, diffusion_step):

diffusion_step = self.diffusion_projection(diffusion_step).unsqueeze(-1)
conditioner = self.conditioner_projection(conditioner)

Expand Down
1 change: 1 addition & 0 deletions tools/hifisinger/gradio_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
MAX_MIXING_SPEAKERS = GLOBAL_CONFIG["max_mixing_speakers"]
MODELS = GLOBAL_CONFIG["models"]


# Speaker mixing component
def get_speakers_layout(init_speakers=[], default_speaker=None):
with gr.Blocks():
Expand Down
1 change: 0 additions & 1 deletion tools/mfa/postprocess_mfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
list_files("dataset/mfa-data/english/LJSpeech/normed", ".wav", recursive=True)
):
try:

textgrid = tg.TextGrid()
textgrid.read(str(file.with_suffix(".TextGrid")))
words = textgrid[0]
Expand Down
Loading