Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (myshell-ai#159)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.4.2](psf/black@23.12.1...24.4.2)
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored May 7, 2024
1 parent 7557d2a commit 40d8200
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
args: [--profile=black]

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.2
hooks:
- id: black

Expand All @@ -21,7 +21,7 @@ repos:
args: [-L=fro]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: check-yaml
Expand Down
10 changes: 7 additions & 3 deletions fish_speech/utils/rich_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ def print_config_tree(

# add fields from `print_order` to queue
for field in print_order:
queue.append(field) if field in cfg else log.warning(
f"Field '{field}' not found in config. "
+ f"Skipping '{field}' config printing..."
(
queue.append(field)
if field in cfg
else log.warning(
f"Field '{field}' not found in config. "
+ f"Skipping '{field}' config printing..."
)
)

# add all the other fields to queue (not specified in `print_order`)
Expand Down
8 changes: 2 additions & 6 deletions fish_speech/webui/launch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,12 @@ def __init__(
spacing_size: sizes.Size | str = sizes.spacing_md,
radius_size: sizes.Size | str = sizes.radius_md,
text_size: sizes.Size | str = sizes.text_lg,
font: fonts.Font
| str
| Iterable[fonts.Font | str] = (
font: fonts.Font | str | Iterable[fonts.Font | str] = (
fonts.GoogleFont("Quicksand"),
"ui-sans-serif",
"sans-serif",
),
font_mono: fonts.Font
| str
| Iterable[fonts.Font | str] = (
font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
fonts.GoogleFont("IBM Plex Mono"),
"ui-monospace",
"monospace",
Expand Down
16 changes: 7 additions & 9 deletions fish_speech/webui/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,7 @@ def generate_folder_name():
project = (
("vqgan_" + new_project)
if vqgan_ckpt == "new"
else latest
if vqgan_ckpt == "latest"
else vqgan_ckpt
else latest if vqgan_ckpt == "latest" else vqgan_ckpt
)
logger.info(project)
train_cmd = [
Expand Down Expand Up @@ -524,9 +522,7 @@ def generate_folder_name():
project = (
("text2semantic_" + new_project)
if llama_ckpt == "new"
else latest
if llama_ckpt == "latest"
else llama_ckpt
else latest if llama_ckpt == "latest" else llama_ckpt
)
logger.info(project)
train_cmd = [
Expand Down Expand Up @@ -861,9 +857,11 @@ def llama_lora_merge(llama_weight, lora_llama_config, lora_weight, llama_lora_ou
minimum=0,
maximum=16,
step=1,
value=init_llama_yml["data"]["num_workers"]
if sys.platform == "linux"
else 0,
value=(
init_llama_yml["data"]["num_workers"]
if sys.platform == "linux"
else 0
),
)
with gr.Row(equal_height=False):
llama_data_batch_size_slider = gr.Slider(
Expand Down
1 change: 1 addition & 0 deletions tools/whisper_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Note: Be aware of your audio sample rate, which defaults to 44.1kHz.
"""

from pathlib import Path

import click
Expand Down

0 comments on commit 40d8200

Please sign in to comment.