Procházet zdrojové kódy

[pre-commit.ci] pre-commit autoupdate (#159)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.4.2](https://github.com/psf/black/compare/23.12.1...24.4.2)
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/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>
pre-commit-ci[bot] před 1 rokem
rodič
revize
40d8200c2d

+ 2 - 2
.pre-commit-config.yaml

@@ -9,7 +9,7 @@ repos:
         args: [--profile=black]
         args: [--profile=black]
 
 
   - repo: https://github.com/psf/black
   - repo: https://github.com/psf/black
-    rev: 23.12.1
+    rev: 24.4.2
     hooks:
     hooks:
       - id: black
       - id: black
 
 
@@ -21,7 +21,7 @@ repos:
         args: [-L=fro]
         args: [-L=fro]
 
 
   - repo: https://github.com/pre-commit/pre-commit-hooks
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v4.5.0
+    rev: v4.6.0
     hooks:
     hooks:
       - id: end-of-file-fixer
       - id: end-of-file-fixer
       - id: check-yaml
       - id: check-yaml

+ 7 - 3
fish_speech/utils/rich_utils.py

@@ -43,9 +43,13 @@ def print_config_tree(
 
 
     # add fields from `print_order` to queue
     # add fields from `print_order` to queue
     for field in print_order:
     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`)
     # add all the other fields to queue (not specified in `print_order`)

+ 2 - 6
fish_speech/webui/launch_utils.py

@@ -83,16 +83,12 @@ class Seafoam(Base):
         spacing_size: sizes.Size | str = sizes.spacing_md,
         spacing_size: sizes.Size | str = sizes.spacing_md,
         radius_size: sizes.Size | str = sizes.radius_md,
         radius_size: sizes.Size | str = sizes.radius_md,
         text_size: sizes.Size | str = sizes.text_lg,
         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"),
             fonts.GoogleFont("Quicksand"),
             "ui-sans-serif",
             "ui-sans-serif",
             "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"),
             fonts.GoogleFont("IBM Plex Mono"),
             "ui-monospace",
             "ui-monospace",
             "monospace",
             "monospace",

+ 7 - 9
fish_speech/webui/manage.py

@@ -452,9 +452,7 @@ def train_process(
         project = (
         project = (
             ("vqgan_" + new_project)
             ("vqgan_" + new_project)
             if vqgan_ckpt == "new"
             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)
         logger.info(project)
         train_cmd = [
         train_cmd = [
@@ -524,9 +522,7 @@ def train_process(
         project = (
         project = (
             ("text2semantic_" + new_project)
             ("text2semantic_" + new_project)
             if llama_ckpt == "new"
             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)
         logger.info(project)
         train_cmd = [
         train_cmd = [
@@ -861,9 +857,11 @@ with gr.Blocks(
                                 minimum=0,
                                 minimum=0,
                                 maximum=16,
                                 maximum=16,
                                 step=1,
                                 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):
                         with gr.Row(equal_height=False):
                             llama_data_batch_size_slider = gr.Slider(
                             llama_data_batch_size_slider = gr.Slider(

+ 1 - 0
tools/whisper_asr.py

@@ -21,6 +21,7 @@ to transcribe the second speaker.
 
 
 Note: Be aware of your audio sample rate, which defaults to 44.1kHz.
 Note: Be aware of your audio sample rate, which defaults to 44.1kHz.
 """
 """
+
 from pathlib import Path
 from pathlib import Path
 
 
 import click
 import click