xinference 0.14.4.post1__py3-none-any.whl → 0.15.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xinference might be problematic. Click here for more details.

Files changed (194) hide show
  1. xinference/_compat.py +51 -0
  2. xinference/_version.py +3 -3
  3. xinference/api/restful_api.py +209 -40
  4. xinference/client/restful/restful_client.py +7 -26
  5. xinference/conftest.py +1 -1
  6. xinference/constants.py +5 -0
  7. xinference/core/cache_tracker.py +1 -1
  8. xinference/core/chat_interface.py +8 -14
  9. xinference/core/event.py +1 -1
  10. xinference/core/image_interface.py +28 -0
  11. xinference/core/model.py +110 -31
  12. xinference/core/scheduler.py +37 -37
  13. xinference/core/status_guard.py +1 -1
  14. xinference/core/supervisor.py +17 -10
  15. xinference/core/utils.py +80 -22
  16. xinference/core/worker.py +17 -16
  17. xinference/deploy/cmdline.py +8 -16
  18. xinference/deploy/local.py +1 -1
  19. xinference/deploy/supervisor.py +1 -1
  20. xinference/deploy/utils.py +1 -1
  21. xinference/deploy/worker.py +1 -1
  22. xinference/model/audio/cosyvoice.py +86 -41
  23. xinference/model/audio/fish_speech.py +9 -9
  24. xinference/model/audio/model_spec.json +9 -9
  25. xinference/model/audio/whisper.py +4 -1
  26. xinference/model/embedding/core.py +52 -31
  27. xinference/model/image/core.py +2 -1
  28. xinference/model/image/model_spec.json +16 -4
  29. xinference/model/image/model_spec_modelscope.json +16 -4
  30. xinference/model/image/sdapi.py +136 -0
  31. xinference/model/image/stable_diffusion/core.py +164 -19
  32. xinference/model/llm/__init__.py +29 -11
  33. xinference/model/llm/llama_cpp/core.py +16 -33
  34. xinference/model/llm/llm_family.json +1011 -1296
  35. xinference/model/llm/llm_family.py +34 -53
  36. xinference/model/llm/llm_family_csghub.json +18 -35
  37. xinference/model/llm/llm_family_modelscope.json +981 -1122
  38. xinference/model/llm/lmdeploy/core.py +56 -88
  39. xinference/model/llm/mlx/core.py +46 -69
  40. xinference/model/llm/sglang/core.py +36 -18
  41. xinference/model/llm/transformers/chatglm.py +168 -306
  42. xinference/model/llm/transformers/cogvlm2.py +36 -63
  43. xinference/model/llm/transformers/cogvlm2_video.py +33 -223
  44. xinference/model/llm/transformers/core.py +55 -50
  45. xinference/model/llm/transformers/deepseek_v2.py +340 -0
  46. xinference/model/llm/transformers/deepseek_vl.py +53 -96
  47. xinference/model/llm/transformers/glm4v.py +55 -111
  48. xinference/model/llm/transformers/intern_vl.py +39 -70
  49. xinference/model/llm/transformers/internlm2.py +32 -54
  50. xinference/model/llm/transformers/minicpmv25.py +22 -55
  51. xinference/model/llm/transformers/minicpmv26.py +158 -68
  52. xinference/model/llm/transformers/omnilmm.py +5 -28
  53. xinference/model/llm/transformers/qwen2_audio.py +168 -0
  54. xinference/model/llm/transformers/qwen2_vl.py +234 -0
  55. xinference/model/llm/transformers/qwen_vl.py +34 -86
  56. xinference/model/llm/transformers/utils.py +32 -38
  57. xinference/model/llm/transformers/yi_vl.py +32 -72
  58. xinference/model/llm/utils.py +280 -554
  59. xinference/model/llm/vllm/core.py +161 -100
  60. xinference/model/rerank/core.py +41 -8
  61. xinference/model/rerank/model_spec.json +7 -0
  62. xinference/model/rerank/model_spec_modelscope.json +7 -1
  63. xinference/model/utils.py +1 -31
  64. xinference/thirdparty/cosyvoice/bin/export_jit.py +64 -0
  65. xinference/thirdparty/cosyvoice/bin/export_trt.py +8 -0
  66. xinference/thirdparty/cosyvoice/bin/inference.py +5 -2
  67. xinference/thirdparty/cosyvoice/cli/cosyvoice.py +38 -22
  68. xinference/thirdparty/cosyvoice/cli/model.py +139 -26
  69. xinference/thirdparty/cosyvoice/flow/flow.py +15 -9
  70. xinference/thirdparty/cosyvoice/flow/length_regulator.py +20 -1
  71. xinference/thirdparty/cosyvoice/hifigan/generator.py +8 -4
  72. xinference/thirdparty/cosyvoice/llm/llm.py +14 -13
  73. xinference/thirdparty/cosyvoice/transformer/attention.py +7 -3
  74. xinference/thirdparty/cosyvoice/transformer/decoder.py +1 -1
  75. xinference/thirdparty/cosyvoice/transformer/embedding.py +4 -3
  76. xinference/thirdparty/cosyvoice/transformer/encoder.py +4 -2
  77. xinference/thirdparty/cosyvoice/utils/common.py +36 -0
  78. xinference/thirdparty/cosyvoice/utils/file_utils.py +16 -0
  79. xinference/thirdparty/deepseek_vl/serve/assets/Kelpy-Codos.js +100 -0
  80. xinference/thirdparty/deepseek_vl/serve/assets/avatar.png +0 -0
  81. xinference/thirdparty/deepseek_vl/serve/assets/custom.css +355 -0
  82. xinference/thirdparty/deepseek_vl/serve/assets/custom.js +22 -0
  83. xinference/thirdparty/deepseek_vl/serve/assets/favicon.ico +0 -0
  84. xinference/thirdparty/deepseek_vl/serve/examples/app.png +0 -0
  85. xinference/thirdparty/deepseek_vl/serve/examples/chart.png +0 -0
  86. xinference/thirdparty/deepseek_vl/serve/examples/mirror.png +0 -0
  87. xinference/thirdparty/deepseek_vl/serve/examples/pipeline.png +0 -0
  88. xinference/thirdparty/deepseek_vl/serve/examples/puzzle.png +0 -0
  89. xinference/thirdparty/deepseek_vl/serve/examples/rap.jpeg +0 -0
  90. xinference/thirdparty/fish_speech/fish_speech/configs/base.yaml +87 -0
  91. xinference/thirdparty/fish_speech/fish_speech/configs/firefly_gan_vq.yaml +33 -0
  92. xinference/thirdparty/fish_speech/fish_speech/configs/lora/r_8_alpha_16.yaml +4 -0
  93. xinference/thirdparty/fish_speech/fish_speech/configs/text2semantic_finetune.yaml +83 -0
  94. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text-data.proto +24 -0
  95. xinference/thirdparty/fish_speech/fish_speech/i18n/README.md +27 -0
  96. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/en_US.json +1 -1
  97. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/es_ES.json +1 -1
  98. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/ja_JP.json +1 -1
  99. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/pt_BR.json +1 -1
  100. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/zh_CN.json +1 -1
  101. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/llama.py +2 -2
  102. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/__init__.py +0 -3
  103. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/firefly.py +169 -198
  104. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/fsq.py +4 -27
  105. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/.gitignore +114 -0
  106. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/README.md +36 -0
  107. xinference/thirdparty/fish_speech/fish_speech/text/clean.py +9 -47
  108. xinference/thirdparty/fish_speech/fish_speech/text/spliter.py +2 -2
  109. xinference/thirdparty/fish_speech/fish_speech/train.py +2 -0
  110. xinference/thirdparty/fish_speech/fish_speech/webui/css/style.css +161 -0
  111. xinference/thirdparty/fish_speech/fish_speech/webui/html/footer.html +11 -0
  112. xinference/thirdparty/fish_speech/fish_speech/webui/js/animate.js +69 -0
  113. xinference/thirdparty/fish_speech/fish_speech/webui/manage.py +12 -10
  114. xinference/thirdparty/fish_speech/tools/api.py +79 -134
  115. xinference/thirdparty/fish_speech/tools/commons.py +35 -0
  116. xinference/thirdparty/fish_speech/tools/download_models.py +3 -3
  117. xinference/thirdparty/fish_speech/tools/file.py +17 -0
  118. xinference/thirdparty/fish_speech/tools/llama/build_dataset.py +1 -1
  119. xinference/thirdparty/fish_speech/tools/llama/generate.py +29 -24
  120. xinference/thirdparty/fish_speech/tools/llama/merge_lora.py +1 -1
  121. xinference/thirdparty/fish_speech/tools/llama/quantize.py +2 -2
  122. xinference/thirdparty/fish_speech/tools/msgpack_api.py +34 -0
  123. xinference/thirdparty/fish_speech/tools/post_api.py +85 -44
  124. xinference/thirdparty/fish_speech/tools/sensevoice/README.md +59 -0
  125. xinference/thirdparty/fish_speech/tools/sensevoice/fun_asr.py +1 -1
  126. xinference/thirdparty/fish_speech/tools/smart_pad.py +16 -3
  127. xinference/thirdparty/fish_speech/tools/vqgan/extract_vq.py +2 -2
  128. xinference/thirdparty/fish_speech/tools/vqgan/inference.py +4 -2
  129. xinference/thirdparty/fish_speech/tools/webui.py +12 -146
  130. xinference/thirdparty/matcha/VERSION +1 -0
  131. xinference/thirdparty/matcha/hifigan/LICENSE +21 -0
  132. xinference/thirdparty/matcha/hifigan/README.md +101 -0
  133. xinference/thirdparty/omnilmm/LICENSE +201 -0
  134. xinference/thirdparty/whisper/__init__.py +156 -0
  135. xinference/thirdparty/whisper/__main__.py +3 -0
  136. xinference/thirdparty/whisper/assets/gpt2.tiktoken +50256 -0
  137. xinference/thirdparty/whisper/assets/mel_filters.npz +0 -0
  138. xinference/thirdparty/whisper/assets/multilingual.tiktoken +50257 -0
  139. xinference/thirdparty/whisper/audio.py +157 -0
  140. xinference/thirdparty/whisper/decoding.py +826 -0
  141. xinference/thirdparty/whisper/model.py +314 -0
  142. xinference/thirdparty/whisper/normalizers/__init__.py +2 -0
  143. xinference/thirdparty/whisper/normalizers/basic.py +76 -0
  144. xinference/thirdparty/whisper/normalizers/english.json +1741 -0
  145. xinference/thirdparty/whisper/normalizers/english.py +550 -0
  146. xinference/thirdparty/whisper/timing.py +386 -0
  147. xinference/thirdparty/whisper/tokenizer.py +395 -0
  148. xinference/thirdparty/whisper/transcribe.py +605 -0
  149. xinference/thirdparty/whisper/triton_ops.py +109 -0
  150. xinference/thirdparty/whisper/utils.py +316 -0
  151. xinference/thirdparty/whisper/version.py +1 -0
  152. xinference/types.py +14 -53
  153. xinference/web/ui/build/asset-manifest.json +6 -6
  154. xinference/web/ui/build/index.html +1 -1
  155. xinference/web/ui/build/static/css/{main.4bafd904.css → main.5061c4c3.css} +2 -2
  156. xinference/web/ui/build/static/css/main.5061c4c3.css.map +1 -0
  157. xinference/web/ui/build/static/js/main.754740c0.js +3 -0
  158. xinference/web/ui/build/static/js/{main.eb13fe95.js.LICENSE.txt → main.754740c0.js.LICENSE.txt} +2 -0
  159. xinference/web/ui/build/static/js/main.754740c0.js.map +1 -0
  160. xinference/web/ui/node_modules/.cache/babel-loader/10c69dc7a296779fcffedeff9393d832dfcb0013c36824adf623d3c518b801ff.json +1 -0
  161. xinference/web/ui/node_modules/.cache/babel-loader/68bede6d95bb5ef0b35bbb3ec5b8c937eaf6862c6cdbddb5ef222a7776aaf336.json +1 -0
  162. xinference/web/ui/node_modules/.cache/babel-loader/77d50223f3e734d4485cca538cb098a8c3a7a0a1a9f01f58cdda3af42fe1adf5.json +1 -0
  163. xinference/web/ui/node_modules/.cache/babel-loader/a56d5a642409a84988891089c98ca28ad0546432dfbae8aaa51bc5a280e1cdd2.json +1 -0
  164. xinference/web/ui/node_modules/.cache/babel-loader/cd90b08d177025dfe84209596fc51878f8a86bcaa6a240848a3d2e5fd4c7ff24.json +1 -0
  165. xinference/web/ui/node_modules/.cache/babel-loader/d9ff696a3e3471f01b46c63d18af32e491eb5dc0e43cb30202c96871466df57f.json +1 -0
  166. xinference/web/ui/node_modules/.cache/babel-loader/e42b72d4cc1ea412ebecbb8d040dc6c6bfee462c33903c2f1f3facb602ad742e.json +1 -0
  167. xinference/web/ui/node_modules/.cache/babel-loader/f5039ddbeb815c51491a1989532006b96fc3ae49c6c60e3c097f875b4ae915ae.json +1 -0
  168. xinference/web/ui/node_modules/.package-lock.json +37 -0
  169. xinference/web/ui/node_modules/a-sync-waterfall/package.json +21 -0
  170. xinference/web/ui/node_modules/nunjucks/node_modules/commander/package.json +48 -0
  171. xinference/web/ui/node_modules/nunjucks/package.json +112 -0
  172. xinference/web/ui/package-lock.json +38 -0
  173. xinference/web/ui/package.json +1 -0
  174. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/METADATA +16 -10
  175. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/RECORD +179 -127
  176. xinference/model/llm/transformers/llama_2.py +0 -108
  177. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/lit_module.py +0 -442
  178. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/discriminator.py +0 -44
  179. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/reference.py +0 -115
  180. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/wavenet.py +0 -225
  181. xinference/thirdparty/fish_speech/tools/auto_rerank.py +0 -159
  182. xinference/thirdparty/fish_speech/tools/gen_ref.py +0 -36
  183. xinference/thirdparty/fish_speech/tools/merge_asr_files.py +0 -55
  184. xinference/web/ui/build/static/css/main.4bafd904.css.map +0 -1
  185. xinference/web/ui/build/static/js/main.eb13fe95.js +0 -3
  186. xinference/web/ui/build/static/js/main.eb13fe95.js.map +0 -1
  187. xinference/web/ui/node_modules/.cache/babel-loader/0b11a5339468c13b2d31ac085e7effe4303259b2071abd46a0a8eb8529233a5e.json +0 -1
  188. xinference/web/ui/node_modules/.cache/babel-loader/213b5913e164773c2b0567455377765715f5f07225fbac77ad8e1e9dc9648a47.json +0 -1
  189. xinference/web/ui/node_modules/.cache/babel-loader/5c26a23b5eacf5b752a08531577ae3840bb247745ef9a39583dc2d05ba93a82a.json +0 -1
  190. xinference/web/ui/node_modules/.cache/babel-loader/978b57d1a04a701bc3fcfebc511f5f274eed6ed7eade67f6fb76c27d5fd9ecc8.json +0 -1
  191. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/LICENSE +0 -0
  192. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/WHEEL +0 -0
  193. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/entry_points.txt +0 -0
  194. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,36 @@
1
+ # This account is no longer in use, see [Atomicoo](https://github.com/atomicoo) for my latest works.
2
+
3
+ # Chn Text Norm
4
+
5
+ this is a repository for chinese text normalization (no longer maintained).
6
+
7
+ ## Quick Start ##
8
+
9
+ ### Git Clone Repo ###
10
+
11
+ git clone this repo to the root directory of your project which need to use it.
12
+
13
+ cd /path/to/proj
14
+ git clone https://github.com/Joee1995/chn-text-norm.git
15
+
16
+ after that, your doc tree should be:
17
+ ```
18
+ proj # root of your project
19
+ |--- chn_text_norm # this chn-text-norm tool
20
+ |--- text.py
21
+ |--- ...
22
+ |--- text_normalize.py # your text normalization code
23
+ |--- ...
24
+ ```
25
+
26
+ ### How to Use ? ###
27
+
28
+ # text_normalize.py
29
+ from chn_text_norm.text import *
30
+
31
+ raw_text = 'your raw text'
32
+ text = Text(raw_text=raw_text).normalize()
33
+
34
+ ### How to add quantums ###
35
+
36
+ 打开test.py,然后你就知道怎么做了。
@@ -1,61 +1,24 @@
1
- import itertools
2
1
  import re
3
2
 
4
- LANGUAGE_UNICODE_RANGE_MAP = {
5
- "ZH": [(0x4E00, 0x9FFF)],
6
- "JP": [(0x4E00, 0x9FFF), (0x3040, 0x309F), (0x30A0, 0x30FF), (0x31F0, 0x31FF)],
7
- "EN": [(0x0000, 0x007F)],
8
- }
9
-
10
3
  SYMBOLS_MAPPING = {
11
- ":": ",",
12
- ";": ",",
13
- ",": ",",
14
- "。": ".",
15
- "!": "!",
16
- "?": "?",
17
- "\n": ".",
18
- "·": ",",
19
- "、": ",",
20
- "...": "…",
21
4
  "“": "'",
22
5
  "”": "'",
23
6
  "‘": "'",
24
7
  "’": "'",
25
- "": "'",
26
- "": "'",
27
- "(": "'",
28
- ")": "'",
29
- "": "'",
30
- "": "'",
31
- "": "'",
32
- "": "'",
33
- "[": "'",
34
- "]": "'",
35
- "—": "-",
36
- "~": "-",
37
- "~": "-",
38
- "・": "-",
39
- "「": "'",
40
- "」": "'",
41
- ";": ",",
42
- ":": ",",
8
+ "": "",
9
+ "": "",
10
+ "[": "",
11
+ "]": "",
12
+ "": "",
13
+ "": "",
14
+ "(": "",
15
+ ")": "",
16
+ "": "·",
43
17
  }
44
18
 
45
19
  REPLACE_SYMBOL_REGEX = re.compile(
46
20
  "|".join(re.escape(p) for p in SYMBOLS_MAPPING.keys())
47
21
  )
48
- ALL_KNOWN_UTF8_RANGE = list(
49
- itertools.chain.from_iterable(LANGUAGE_UNICODE_RANGE_MAP.values())
50
- )
51
- REMOVE_UNKNOWN_SYMBOL_REGEX = re.compile(
52
- "[^"
53
- + "".join(
54
- f"{re.escape(chr(start))}-{re.escape(chr(end))}"
55
- for start, end in ALL_KNOWN_UTF8_RANGE
56
- )
57
- + "]"
58
- )
59
22
 
60
23
 
61
24
  def clean_text(text):
@@ -64,6 +27,5 @@ def clean_text(text):
64
27
 
65
28
  # Replace all chinese symbols with their english counterparts
66
29
  text = REPLACE_SYMBOL_REGEX.sub(lambda x: SYMBOLS_MAPPING[x.group()], text)
67
- text = REMOVE_UNKNOWN_SYMBOL_REGEX.sub("", text)
68
30
 
69
31
  return text
@@ -71,9 +71,9 @@ def split_text(text, length):
71
71
 
72
72
  texts = [text]
73
73
  texts = map(protect_float, texts)
74
- texts = break_text(texts, length, {".", "!", "?"})
74
+ texts = break_text(texts, length, {".", "!", "?", "。", "!", "?"})
75
75
  texts = map(unprotect_float, texts)
76
- texts = break_text(texts, length, {","})
76
+ texts = break_text(texts, length, {",", ","})
77
77
  texts = break_text(texts, length, {" "})
78
78
  texts = list(break_text_by_length(texts, length))
79
79
 
@@ -1,4 +1,6 @@
1
1
  import os
2
+
3
+ os.environ["USE_LIBUV"] = "0"
2
4
  import sys
3
5
  from typing import Optional
4
6
 
@@ -0,0 +1,161 @@
1
+ :root {
2
+ --my-200: #80eeee;
3
+ --my-50: #ecfdf5;
4
+ --water-width: 300px;
5
+ --water-heigh: 300px;
6
+ }
7
+
8
+
9
+ /* general styled components */
10
+ .tools {
11
+ align-items: center;
12
+ justify-content: center;
13
+ }
14
+
15
+ .gradio-button {
16
+ max-width: 2.2em;
17
+ min-width: 2.2em !important;
18
+ height: 2.4em;
19
+ align-self: end;
20
+ line-height: 1em;
21
+ border-radius: 0.5em;
22
+
23
+ }
24
+
25
+ .gradio-button.secondary-down, .gradio-button.secondary-down:hover{
26
+ box-shadow: 1px 1px 1px rgba(0,0,0,0.25) inset, 0px 0px 3px rgba(0,0,0,0.15) inset;
27
+ }
28
+
29
+ /* replace original footer with ours */
30
+ a{
31
+ font-weight: bold;
32
+ cursor: pointer;
33
+ color: #030C14 !important;
34
+ }
35
+
36
+ footer {
37
+ display: none !important;
38
+ }
39
+
40
+ #footer{
41
+ text-align: center;
42
+ }
43
+
44
+ #footer div{
45
+ display: inline-block;
46
+ }
47
+
48
+ #footer .versions{
49
+ font-size: 85%;
50
+ opacity: 0.85;
51
+ }
52
+
53
+ /*@keyframes moveBackground {*/
54
+ /* 0% {*/
55
+ /* background-position: 0 0;*/
56
+ /* }*/
57
+ /* 100% {*/
58
+ /* background-position: -100px 100px;*/
59
+ /* }*/
60
+ /*}*/
61
+ @keyframes moveJellyBackground {
62
+ 0% {
63
+ background-position: 0% 50%;
64
+ }
65
+ 50% {
66
+ background-position: 100% 50%;
67
+ }
68
+ 100% {
69
+ background-position: 0% 50%;
70
+ }
71
+ }
72
+
73
+ .gradio-container {
74
+ position: absolute;
75
+ z-index: 10;
76
+ }
77
+
78
+
79
+ .quan {
80
+ position: absolute;
81
+ bottom: 0;
82
+ width: var(--water-width);
83
+ height: var(--water-heigh);
84
+ border-radius: 0;
85
+ /*border: 3px solid rgb(246, 247, 248);*/
86
+ /*box-shadow: 0 0 0 3px rgb(41, 134, 196);*/
87
+ z-index: 0;
88
+
89
+ }
90
+
91
+ .quan:last-child {
92
+ margin-right: 0;
93
+ }
94
+
95
+ .shui {
96
+ position: absolute;
97
+ top: 0;
98
+ left: 0;
99
+ width: 100%;
100
+ height: 100%;
101
+ background-color: rgb(23, 106, 201);
102
+ border-radius: 0;
103
+ overflow: hidden;
104
+ z-index: 0;
105
+ }
106
+
107
+ .shui::after {
108
+
109
+ content: '';
110
+ position: absolute;
111
+ top: 20%;
112
+ left: 50%;
113
+ width: 150%;
114
+ height: 150%;
115
+ border-radius: 40%;
116
+ background-image: radial-gradient(circle at 0% 50%, #dcfcf1, var(--my-50) 50%);
117
+ animation: shi 5s linear infinite;
118
+ }
119
+
120
+ @keyframes shi {
121
+ 0% {
122
+ transform: translate(-50%, -65%) rotate(0deg);
123
+ }
124
+ 100% {
125
+ transform: translate(-50%, -65%) rotate(360deg);
126
+ }
127
+ }
128
+
129
+ .shui::before {
130
+ content: '';
131
+ position: absolute;
132
+ top: 20%;
133
+ left: 50%;
134
+ width: 150%;
135
+ height: 150%;
136
+ border-radius: 42%;
137
+ background-color: rgb(240, 228, 228, 0.2);
138
+ animation: xu 7s linear infinite;
139
+ }
140
+
141
+ @keyframes xu {
142
+ 0% {
143
+ transform: translate(-50%, -60%) rotate(0deg);
144
+ }
145
+ 100% {
146
+ transform: translate(-50%, -60%) rotate(360deg);
147
+ }
148
+ }
149
+
150
+ fieldset.data_src div.wrap label {
151
+ background: #f8bffee0 !important;
152
+ }
153
+
154
+ .scrollable-component {
155
+ max-height: 100px;
156
+ overflow-y: auto;
157
+ }
158
+
159
+ #file_accordion {
160
+ max-height: 220px !important;
161
+ }
@@ -0,0 +1,11 @@
1
+ <div style="color: rgba(25,255,205,0.7) !important;">
2
+ <a href="{api_docs}">API</a>
3
+  • 
4
+ <a href="https://github.com/fishaudio/fish-speech">Github</a>
5
+  • 
6
+ <a href="https://gradio.app">Gradio</a>
7
+ </div>
8
+ <br />
9
+ <div class="versions" style="color: rgba(25,255,205,0.7) !important;">
10
+ {versions}
11
+ </div>
@@ -0,0 +1,69 @@
1
+
2
+ function createGradioAnimation() {
3
+ const params = new URLSearchParams(window.location.search);
4
+ if (!params.has('__theme')) {
5
+ params.set('__theme', 'light');
6
+ window.location.search = params.toString();
7
+ }
8
+
9
+ var gradioApp = document.querySelector('gradio-app');
10
+ if (gradioApp) {
11
+
12
+ document.documentElement.style.setProperty('--my-200', '#80eeee');
13
+ document.documentElement.style.setProperty('--my-50', '#ecfdf5');
14
+
15
+ // gradioApp.style.position = 'relative';
16
+ // gradioApp.style.backgroundSize = '200% 200%';
17
+ // gradioApp.style.animation = 'moveJellyBackground 10s ease infinite';
18
+ // gradioApp.style.backgroundImage = 'radial-gradient(circle at 0% 50%, var(--my-200), var(--my-50) 50%)';
19
+ // gradioApp.style.display = 'flex';
20
+ // gradioApp.style.justifyContent = 'flex-start';
21
+ // gradioApp.style.flexWrap = 'nowrap';
22
+ // gradioApp.style.overflowX = 'auto';
23
+
24
+ // for (let i = 0; i < 6; i++) {
25
+ // var quan = document.createElement('div');
26
+ // quan.className = 'quan';
27
+ // gradioApp.insertBefore(quan, gradioApp.firstChild);
28
+ // quan.id = 'quan' + i.toString();
29
+ // quan.style.left = 'calc(var(--water-width) * ' + i.toString() + ')';
30
+ // var quanContainer = document.querySelector('.quan');
31
+ // if (quanContainer) {
32
+ // var shui = document.createElement('div');
33
+ // shui.className = 'shui';
34
+ // quanContainer.insertBefore(shui, quanContainer.firstChild)
35
+ // }
36
+ // }
37
+ }
38
+
39
+ var container = document.createElement('div');
40
+ container.id = 'gradio-animation';
41
+ container.style.fontSize = '2em';
42
+ container.style.fontFamily = 'Maiandra GD, ui-monospace, monospace';
43
+ container.style.fontWeight = 'bold';
44
+ container.style.textAlign = 'center';
45
+ container.style.marginBottom = '20px';
46
+
47
+ var text = 'Welcome to Fish-Speech!';
48
+ for (var i = 0; i < text.length; i++) {
49
+ (function(i){
50
+ setTimeout(function(){
51
+ var letter = document.createElement('span');
52
+ letter.style.opacity = '0';
53
+ letter.style.transition = 'opacity 0.5s';
54
+ letter.innerText = text[i];
55
+
56
+ container.appendChild(letter);
57
+
58
+ setTimeout(function() {
59
+ letter.style.opacity = '1';
60
+ }, 50);
61
+ }, i * 200);
62
+ })(i);
63
+ }
64
+
65
+ var gradioContainer = document.querySelector('.gradio-container');
66
+ gradioContainer.insertBefore(container, gradioContainer.firstChild);
67
+
68
+ return 'Animation created';
69
+ }
@@ -1,9 +1,11 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import os
4
+
5
+ os.environ["USE_LIBUV"] = "0"
3
6
  import datetime
4
7
  import html
5
8
  import json
6
- import os
7
9
  import platform
8
10
  import shutil
9
11
  import signal
@@ -469,7 +471,7 @@ def train_process(
469
471
  "--config-name",
470
472
  "firefly_gan_vq",
471
473
  "--checkpoint-path",
472
- "checkpoints/fish-speech-1.2-sft/firefly-gan-vq-fsq-4x1024-42hz-generator.pth",
474
+ "checkpoints/fish-speech-1.4/firefly-gan-vq-fsq-8x1024-21hz-generator.pth",
473
475
  ]
474
476
  )
475
477
 
@@ -485,7 +487,7 @@ def train_process(
485
487
  "16",
486
488
  ]
487
489
  )
488
- ckpt_path = "checkpoints/fish-speech-1.2-sft/model.pth"
490
+ ckpt_path = "checkpoints/fish-speech-1.4/model.pth"
489
491
  lora_prefix = "lora_" if llama_use_lora else ""
490
492
  llama_name = lora_prefix + "text2semantic_" + new_project
491
493
  latest = next(
@@ -862,7 +864,7 @@ with gr.Blocks(
862
864
  minimum=1,
863
865
  maximum=32,
864
866
  step=1,
865
- value=4,
867
+ value=2,
866
868
  )
867
869
  llama_data_max_length_slider = gr.Slider(
868
870
  label=i18n("Maximum Length per Sample"),
@@ -870,7 +872,7 @@ with gr.Blocks(
870
872
  minimum=1024,
871
873
  maximum=4096,
872
874
  step=128,
873
- value=1024,
875
+ value=2048,
874
876
  )
875
877
  with gr.Row(equal_height=False):
876
878
  llama_precision_dropdown = gr.Dropdown(
@@ -925,9 +927,9 @@ with gr.Blocks(
925
927
  "Type the path or select from the dropdown"
926
928
  ),
927
929
  choices=[
928
- "checkpoints/fish-speech-1.2-sft/model.pth",
930
+ "checkpoints/fish-speech-1.4/model.pth",
929
931
  ],
930
- value="checkpoints/fish-speech-1.2-sft/model.pth",
932
+ value="checkpoints/fish-speech-1.4/model.pth",
931
933
  allow_custom_value=True,
932
934
  interactive=True,
933
935
  )
@@ -979,7 +981,7 @@ with gr.Blocks(
979
981
  "Type the path or select from the dropdown"
980
982
  ),
981
983
  choices=list_llama_models(),
982
- value="checkpoints/fish-speech-1.2-sft",
984
+ value="checkpoints/fish-speech-1.4",
983
985
  allow_custom_value=True,
984
986
  interactive=True,
985
987
  )
@@ -1042,7 +1044,7 @@ with gr.Blocks(
1042
1044
  "Type the path or select from the dropdown"
1043
1045
  ),
1044
1046
  choices=list_decoder_models(),
1045
- value="checkpoints/fish-speech-1.2-sft/firefly-gan-vq-fsq-4x1024-42hz-generator.pth",
1047
+ value="checkpoints/fish-speech-1.4/firefly-gan-vq-fsq-8x1024-21hz-generator.pth",
1046
1048
  allow_custom_value=True,
1047
1049
  )
1048
1050
  infer_decoder_config = gr.Dropdown(
@@ -1060,7 +1062,7 @@ with gr.Blocks(
1060
1062
  info=i18n(
1061
1063
  "Type the path or select from the dropdown"
1062
1064
  ),
1063
- value="checkpoints/fish-speech-1.2-sft",
1065
+ value="checkpoints/fish-speech-1.4",
1064
1066
  choices=list_llama_models(),
1065
1067
  allow_custom_value=True,
1066
1068
  )