xinference 1.10.1__py3-none-any.whl → 1.11.0.post1__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 (39) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +462 -3
  3. xinference/client/restful/async_restful_client.py +158 -5
  4. xinference/client/restful/restful_client.py +131 -0
  5. xinference/core/supervisor.py +12 -0
  6. xinference/model/audio/model_spec.json +20 -20
  7. xinference/model/image/model_spec.json +159 -159
  8. xinference/model/llm/__init__.py +2 -2
  9. xinference/model/llm/llm_family.json +843 -180
  10. xinference/model/llm/mlx/distributed_models/core.py +41 -0
  11. xinference/model/llm/mlx/distributed_models/qwen2.py +1 -2
  12. xinference/model/llm/sglang/core.py +20 -6
  13. xinference/model/llm/tool_parsers/qwen_tool_parser.py +29 -4
  14. xinference/model/llm/transformers/chatglm.py +3 -0
  15. xinference/model/llm/transformers/core.py +93 -16
  16. xinference/model/llm/transformers/multimodal/minicpmv45.py +340 -0
  17. xinference/model/llm/transformers/utils.py +3 -0
  18. xinference/model/llm/utils.py +37 -24
  19. xinference/model/llm/vllm/core.py +128 -69
  20. xinference/model/utils.py +74 -31
  21. xinference/thirdparty/audiotools/core/audio_signal.py +6 -6
  22. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/text.py +1 -1
  23. xinference/thirdparty/melo/text/chinese_mix.py +2 -2
  24. xinference/types.py +9 -0
  25. xinference/ui/web/ui/build/asset-manifest.json +3 -3
  26. xinference/ui/web/ui/build/index.html +1 -1
  27. xinference/ui/web/ui/build/static/js/{main.d192c4f3.js → main.e4d9a9e1.js} +3 -3
  28. xinference/ui/web/ui/build/static/js/{main.d192c4f3.js.map → main.e4d9a9e1.js.map} +1 -1
  29. xinference/ui/web/ui/node_modules/.cache/babel-loader/e6770a05771952175c9fbf48fce283c9bb1bc8b5763e39edc36d099d1fe16b4a.json +1 -0
  30. xinference/ui/web/ui/node_modules/.cache/babel-loader/ea2a26361204e70cf1018d6990fb6354bed82b3ac69690391e0f100385e7abb7.json +1 -0
  31. {xinference-1.10.1.dist-info → xinference-1.11.0.post1.dist-info}/METADATA +8 -5
  32. {xinference-1.10.1.dist-info → xinference-1.11.0.post1.dist-info}/RECORD +37 -36
  33. xinference/ui/web/ui/node_modules/.cache/babel-loader/7275b67c78ec76ce38a686bb8a576d8c9cecf54e1573614c84859d538efb9be5.json +0 -1
  34. xinference/ui/web/ui/node_modules/.cache/babel-loader/f995a2425dfb0822fd07127f66ffe9b026883bc156b402eb8bd0b83d52460a93.json +0 -1
  35. /xinference/ui/web/ui/build/static/js/{main.d192c4f3.js.LICENSE.txt → main.e4d9a9e1.js.LICENSE.txt} +0 -0
  36. {xinference-1.10.1.dist-info → xinference-1.11.0.post1.dist-info}/WHEEL +0 -0
  37. {xinference-1.10.1.dist-info → xinference-1.11.0.post1.dist-info}/entry_points.txt +0 -0
  38. {xinference-1.10.1.dist-info → xinference-1.11.0.post1.dist-info}/licenses/LICENSE +0 -0
  39. {xinference-1.10.1.dist-info → xinference-1.11.0.post1.dist-info}/top_level.txt +0 -0
@@ -41,7 +41,7 @@ window_length : int, optional
41
41
  hop_length : int, optional
42
42
  Hop length of STFT, by default ``window_length // 4``.
43
43
  window_type : str, optional
44
- Type of window to use, by default ``sqrt\_hann``.
44
+ Type of window to use, by default ``sqrt\\_hann``.
45
45
  match_stride : bool, optional
46
46
  Whether to match the stride of convolutional layers, by default False
47
47
  padding_type : str, optional
@@ -1011,7 +1011,7 @@ class AudioSignal(
1011
1011
  def get_window(window_type: str, window_length: int, device: str):
1012
1012
  """Wrapper around scipy.signal.get_window so one can also get the
1013
1013
  popular sqrt-hann window. This function caches for efficiency
1014
- using functools.lru\_cache.
1014
+ using functools.lru\\_cache.
1015
1015
 
1016
1016
  Parameters
1017
1017
  ----------
@@ -1089,7 +1089,7 @@ class AudioSignal(
1089
1089
  def compute_stft_padding(
1090
1090
  self, window_length: int, hop_length: int, match_stride: bool
1091
1091
  ):
1092
- """Compute how the STFT should be padded, based on match\_stride.
1092
+ """Compute how the STFT should be padded, based on match\\_stride.
1093
1093
 
1094
1094
  Parameters
1095
1095
  ----------
@@ -1138,7 +1138,7 @@ class AudioSignal(
1138
1138
  hop_length : int, optional
1139
1139
  Hop length of STFT, by default ``window_length // 4``.
1140
1140
  window_type : str, optional
1141
- Type of window to use, by default ``sqrt\_hann``.
1141
+ Type of window to use, by default ``sqrt\\_hann``.
1142
1142
  match_stride : bool, optional
1143
1143
  Whether to match the stride of convolutional layers, by default False
1144
1144
  padding_type : str, optional
@@ -1219,7 +1219,7 @@ class AudioSignal(
1219
1219
  match_stride: bool = None,
1220
1220
  length: int = None,
1221
1221
  ):
1222
- """Computes inverse STFT and sets it to audio\_data.
1222
+ """Computes inverse STFT and sets it to audio\\_data.
1223
1223
 
1224
1224
  Parameters
1225
1225
  ----------
@@ -1228,7 +1228,7 @@ class AudioSignal(
1228
1228
  hop_length : int, optional
1229
1229
  Hop length of STFT, by default ``window_length // 4``.
1230
1230
  window_type : str, optional
1231
- Type of window to use, by default ``sqrt\_hann``.
1231
+ Type of window to use, by default ``sqrt\\_hann``.
1232
1232
  match_stride : bool, optional
1233
1233
  Whether to match the stride of convolutional layers, by default False
1234
1234
  length : int, optional
@@ -68,7 +68,7 @@ class Text:
68
68
  pattern = re.compile(
69
69
  r"\D+((\d+(\.\d+)?)[多余几]?"
70
70
  + CURRENCY_UNITS
71
- + "(\d"
71
+ + R"(\d"
72
72
  + CURRENCY_UNITS
73
73
  + "?)?)"
74
74
  )
@@ -209,13 +209,13 @@ def _g2p_v2(segments):
209
209
  for text in segments:
210
210
  assert spliter not in text
211
211
  # replace all english words
212
- text = re.sub('([a-zA-Z\s]+)', lambda x: f'{spliter}{x.group(1)}{spliter}', text)
212
+ text = re.sub(r'([a-zA-Z\s]+)', lambda x: f'{spliter}{x.group(1)}{spliter}', text)
213
213
  texts = text.split(spliter)
214
214
  texts = [t for t in texts if len(t) > 0]
215
215
 
216
216
 
217
217
  for text in texts:
218
- if re.match('[a-zA-Z\s]+', text):
218
+ if re.match(r'[a-zA-Z\s]+', text):
219
219
  # english
220
220
  tokenized_en = tokenizer.tokenize(text)
221
221
  phones_en, tones_en, word2ph_en = g2p_en(text=None, pad_start_end=False, tokenized=tokenized_en)
xinference/types.py CHANGED
@@ -47,6 +47,15 @@ class ImageList(TypedDict):
47
47
  data: List[Image]
48
48
 
49
49
 
50
+ class ImageEditRequest(TypedDict, total=False):
51
+ image: Union[Union[str, bytes], List[Union[str, bytes]]]
52
+ mask: Optional[Union[str, bytes]]
53
+ prompt: str
54
+ n: int
55
+ size: Optional[str]
56
+ response_format: str
57
+
58
+
50
59
  class SDAPIResult(TypedDict):
51
60
  images: List[str]
52
61
  parameters: dict
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.5ea97072.css",
4
- "main.js": "./static/js/main.d192c4f3.js",
4
+ "main.js": "./static/js/main.e4d9a9e1.js",
5
5
  "static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
6
6
  "index.html": "./index.html",
7
7
  "main.5ea97072.css.map": "./static/css/main.5ea97072.css.map",
8
- "main.d192c4f3.js.map": "./static/js/main.d192c4f3.js.map"
8
+ "main.e4d9a9e1.js.map": "./static/js/main.e4d9a9e1.js.map"
9
9
  },
10
10
  "entrypoints": [
11
11
  "static/css/main.5ea97072.css",
12
- "static/js/main.d192c4f3.js"
12
+ "static/js/main.e4d9a9e1.js"
13
13
  ]
14
14
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.d192c4f3.js"></script><link href="./static/css/main.5ea97072.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.e4d9a9e1.js"></script><link href="./static/css/main.5ea97072.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>