From 15533f3ab94d93fccc580882f47406dcb796a670 Mon Sep 17 00:00:00 2001 From: AIFSH <1509359472@qq.com> Date: Tue, 15 Oct 2024 10:59:18 +0800 Subject: [PATCH] init commit --- .gitignore | 1 + README.md | 11 +- __init__.py | 275 + config_24k.json | 123 + doc/base_workflow.json | 181 + fireredtts/fireredtts.py | 163 + fireredtts/modules/__init__.py | 42 + fireredtts/modules/bigvgan/__init__.py | 6 + fireredtts/modules/bigvgan/activations.py | 126 + .../bigvgan/alias_free_cuda/__init__.py | 0 .../bigvgan/alias_free_cuda/activation1d.py | 75 + .../alias_free_cuda/anti_alias_activation.cpp | 48 + .../anti_alias_activation_cuda.cu | 314 + .../modules/bigvgan/alias_free_cuda/compat.h | 31 + .../modules/bigvgan/alias_free_cuda/load.py | 85 + .../alias_free_cuda/test_activation.py | 64 + .../test_activation_snake_beta.py | 64 + .../bigvgan/alias_free_cuda/type_shim.h | 97 + .../bigvgan/alias_free_torch/__init__.py | 5 + .../modules/bigvgan/alias_free_torch/act.py | 29 + .../bigvgan/alias_free_torch/filter.py | 98 + .../bigvgan/alias_free_torch/resample.py | 57 + fireredtts/modules/bigvgan/bigvgan.py | 399 + fireredtts/modules/codec/speaker.py | 1052 + fireredtts/modules/flow/__init__.py | 24 + fireredtts/modules/flow/codebook.npy | Bin 0 -> 131200 bytes fireredtts/modules/flow/codec_embedding.py | 31 + fireredtts/modules/flow/conformer.py | 730 + fireredtts/modules/flow/decoder.py | 396 + fireredtts/modules/flow/flow_model.py | 89 + fireredtts/modules/flow/mel_encoder.py | 170 + fireredtts/modules/flow/mel_spectrogram.py | 132 + fireredtts/modules/flow/transformer.py | 249 + fireredtts/modules/flow/utils.py | 30 + fireredtts/modules/gpt/__init__.py | 0 fireredtts/modules/gpt/gpt.py | 356 + .../modules/text_normalizer/__init__.py | 0 .../modules/text_normalizer/normalize.py | 178 + .../modules/text_normalizer/regex_common.py | 23 + fireredtts/modules/text_normalizer/utils.py | 121 + fireredtts/modules/tokenizer/__init__.py | 0 .../tokenizer/assets/multilingual.tiktoken | 57184 ++++++++++++++++ fireredtts/modules/tokenizer/tokenizer.py | 46 + .../modules/tokenizer/whisper_tokenizer.py | 456 + fireredtts/utils/__init__.py | 0 fireredtts/utils/utils.py | 37 + requirements.txt | 12 + 47 files changed, 63609 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 __init__.py create mode 100644 config_24k.json create mode 100644 doc/base_workflow.json create mode 100644 fireredtts/fireredtts.py create mode 100644 fireredtts/modules/__init__.py create mode 100644 fireredtts/modules/bigvgan/__init__.py create mode 100644 fireredtts/modules/bigvgan/activations.py create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/__init__.py create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/activation1d.py create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/anti_alias_activation.cpp create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/anti_alias_activation_cuda.cu create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/compat.h create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/load.py create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/test_activation.py create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/test_activation_snake_beta.py create mode 100644 fireredtts/modules/bigvgan/alias_free_cuda/type_shim.h create mode 100644 fireredtts/modules/bigvgan/alias_free_torch/__init__.py create mode 100644 fireredtts/modules/bigvgan/alias_free_torch/act.py create mode 100644 fireredtts/modules/bigvgan/alias_free_torch/filter.py create mode 100644 fireredtts/modules/bigvgan/alias_free_torch/resample.py create mode 100644 fireredtts/modules/bigvgan/bigvgan.py create mode 100644 fireredtts/modules/codec/speaker.py create mode 100644 fireredtts/modules/flow/__init__.py create mode 100644 fireredtts/modules/flow/codebook.npy create mode 100644 fireredtts/modules/flow/codec_embedding.py create mode 100644 fireredtts/modules/flow/conformer.py create mode 100644 fireredtts/modules/flow/decoder.py create mode 100644 fireredtts/modules/flow/flow_model.py create mode 100644 fireredtts/modules/flow/mel_encoder.py create mode 100644 fireredtts/modules/flow/mel_spectrogram.py create mode 100644 fireredtts/modules/flow/transformer.py create mode 100644 fireredtts/modules/flow/utils.py create mode 100644 fireredtts/modules/gpt/__init__.py create mode 100644 fireredtts/modules/gpt/gpt.py create mode 100644 fireredtts/modules/text_normalizer/__init__.py create mode 100644 fireredtts/modules/text_normalizer/normalize.py create mode 100644 fireredtts/modules/text_normalizer/regex_common.py create mode 100644 fireredtts/modules/text_normalizer/utils.py create mode 100644 fireredtts/modules/tokenizer/__init__.py create mode 100644 fireredtts/modules/tokenizer/assets/multilingual.tiktoken create mode 100644 fireredtts/modules/tokenizer/tokenizer.py create mode 100644 fireredtts/modules/tokenizer/whisper_tokenizer.py create mode 100644 fireredtts/utils/__init__.py create mode 100644 fireredtts/utils/utils.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed8ebf5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ \ No newline at end of file diff --git a/README.md b/README.md index 35bae4c..06de30d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # FireRedTTS-ComfyUI -a custom node for [FireRedTTS](https://github.com/FireRedTeam/FireRedTTS) +a custom node for [FireRedTTS](https://github.com/FireRedTeam/FireRedTTS),you can find [workflow here](./doc/base_workflow.json) + +## Example +|text|prompt_wav|out_wav| +|--|--|--| +|`《三体》是刘慈欣创作的长篇科幻小说系列,由《三体》《三体2:黑暗森林》《三体3:死神永生》组成,第一部于2006年5月起在《科幻世界》杂志上连载,第二部于2008年5月首次出版,第三部则于2010年11月出版。作品讲述了地球人类文明和三体文明的信息交流、生死搏杀及两个文明在宇宙中的兴衰历程。其第一部经过刘宇昆翻译后获得了第73届雨果奖最佳长篇小说奖,第三部英文版获得2017年轨迹奖最佳长篇科幻小说奖。2019年,列入“新中国70年70部长篇小说典藏”。2022年9月,《三体》入选2021十大年度国家IP。`|