xinference 1.6.0.post1__py3-none-any.whl → 1.7.0__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.
- xinference/_version.py +3 -3
- xinference/api/restful_api.py +79 -2
- xinference/client/restful/restful_client.py +65 -3
- xinference/conftest.py +0 -7
- xinference/core/media_interface.py +132 -8
- xinference/core/model.py +44 -6
- xinference/core/scheduler.py +1 -10
- xinference/core/supervisor.py +8 -17
- xinference/core/worker.py +5 -27
- xinference/deploy/cmdline.py +6 -2
- xinference/model/audio/chattts.py +24 -39
- xinference/model/audio/cosyvoice.py +18 -30
- xinference/model/audio/funasr.py +42 -0
- xinference/model/audio/model_spec.json +71 -1
- xinference/model/audio/model_spec_modelscope.json +76 -2
- xinference/model/audio/utils.py +75 -0
- xinference/model/core.py +1 -0
- xinference/model/embedding/__init__.py +74 -18
- xinference/model/embedding/core.py +98 -589
- xinference/model/embedding/embed_family.py +133 -0
- xinference/{thirdparty/omnilmm/train → model/embedding/flag}/__init__.py +1 -1
- xinference/model/embedding/flag/core.py +282 -0
- xinference/model/embedding/model_spec.json +24 -0
- xinference/model/embedding/model_spec_modelscope.json +24 -0
- xinference/model/embedding/sentence_transformers/__init__.py +13 -0
- xinference/model/embedding/sentence_transformers/core.py +399 -0
- xinference/model/embedding/vllm/core.py +95 -0
- xinference/model/image/model_spec.json +30 -3
- xinference/model/image/model_spec_modelscope.json +41 -2
- xinference/model/image/stable_diffusion/core.py +144 -53
- xinference/model/llm/__init__.py +6 -54
- xinference/model/llm/core.py +19 -5
- xinference/model/llm/llama_cpp/core.py +59 -3
- xinference/model/llm/llama_cpp/memory.py +457 -0
- xinference/model/llm/llm_family.json +247 -402
- xinference/model/llm/llm_family.py +88 -16
- xinference/model/llm/llm_family_modelscope.json +260 -421
- xinference/model/llm/llm_family_openmind_hub.json +0 -34
- xinference/model/llm/sglang/core.py +8 -0
- xinference/model/llm/transformers/__init__.py +27 -6
- xinference/model/llm/transformers/chatglm.py +4 -2
- xinference/model/llm/transformers/core.py +49 -28
- xinference/model/llm/transformers/deepseek_v2.py +6 -49
- xinference/model/llm/transformers/gemma3.py +119 -164
- xinference/model/llm/transformers/multimodal/__init__.py +13 -0
- xinference/model/llm/transformers/{cogagent.py → multimodal/cogagent.py} +58 -95
- xinference/model/llm/transformers/multimodal/core.py +205 -0
- xinference/model/llm/transformers/{deepseek_vl2.py → multimodal/deepseek_vl2.py} +59 -120
- xinference/model/llm/transformers/multimodal/gemma3.py +117 -0
- xinference/model/llm/transformers/{glm4v.py → multimodal/glm4v.py} +57 -93
- xinference/model/llm/transformers/multimodal/intern_vl.py +412 -0
- xinference/model/llm/transformers/{minicpmv26.py → multimodal/minicpmv26.py} +55 -102
- xinference/model/llm/transformers/{ovis2.py → multimodal/ovis2.py} +114 -175
- xinference/model/llm/transformers/{qwen-omni.py → multimodal/qwen-omni.py} +82 -167
- xinference/model/llm/transformers/multimodal/qwen2_audio.py +131 -0
- xinference/model/llm/transformers/{qwen2_vl.py → multimodal/qwen2_vl.py} +224 -256
- xinference/model/llm/transformers/opt.py +4 -2
- xinference/model/llm/transformers/utils.py +6 -37
- xinference/model/llm/utils.py +11 -0
- xinference/model/llm/vllm/core.py +7 -0
- xinference/model/rerank/core.py +91 -3
- xinference/model/rerank/model_spec.json +24 -0
- xinference/model/rerank/model_spec_modelscope.json +24 -0
- xinference/model/rerank/utils.py +20 -2
- xinference/model/utils.py +38 -1
- xinference/model/video/diffusers.py +65 -3
- xinference/model/video/model_spec.json +31 -4
- xinference/model/video/model_spec_modelscope.json +32 -4
- xinference/web/ui/build/asset-manifest.json +6 -6
- xinference/web/ui/build/index.html +1 -1
- xinference/web/ui/build/static/css/main.013f296b.css +2 -0
- xinference/web/ui/build/static/css/main.013f296b.css.map +1 -0
- xinference/web/ui/build/static/js/main.8a9e3ba0.js +3 -0
- xinference/web/ui/build/static/js/main.8a9e3ba0.js.map +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/34cfbfb7836e136ba3261cfd411cc554bf99ba24b35dcceebeaa4f008cb3c9dc.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/55b9fb40b57fa926e8f05f31c2f96467e76e5ad62f033dca97c03f9e8c4eb4fe.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/567e49df411efb24425d289bb484758cb57067ca54f8b5c67fe4505f698deb96.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/6595880facebca7ceace6f17cf21c3a5a9219a2f52fb0ba9f3cf1131eddbcf6b.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/aa998bc2d9c11853add6b8a2e08f50327f56d8824ccaaec92d6dde1b305f0d85.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/c748246b1d7bcebc16153be69f37e955bb2145526c47dd425aeeff70d3004dbc.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/e31234e95d60a5a7883fbcd70de2475dc1c88c90705df1a530abb68f86f80a51.json +1 -0
- xinference/web/ui/src/locales/en.json +21 -8
- xinference/web/ui/src/locales/ja.json +224 -0
- xinference/web/ui/src/locales/ko.json +224 -0
- xinference/web/ui/src/locales/zh.json +21 -8
- {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/METADATA +14 -11
- {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/RECORD +93 -100
- {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/WHEEL +1 -1
- xinference/model/llm/transformers/cogvlm2.py +0 -442
- xinference/model/llm/transformers/cogvlm2_video.py +0 -333
- xinference/model/llm/transformers/deepseek_vl.py +0 -280
- xinference/model/llm/transformers/glm_edge_v.py +0 -213
- xinference/model/llm/transformers/intern_vl.py +0 -526
- xinference/model/llm/transformers/internlm2.py +0 -94
- xinference/model/llm/transformers/minicpmv25.py +0 -193
- xinference/model/llm/transformers/omnilmm.py +0 -132
- xinference/model/llm/transformers/qwen2_audio.py +0 -179
- xinference/model/llm/transformers/qwen_vl.py +0 -360
- xinference/thirdparty/omnilmm/LICENSE +0 -201
- xinference/thirdparty/omnilmm/chat.py +0 -218
- xinference/thirdparty/omnilmm/constants.py +0 -4
- xinference/thirdparty/omnilmm/conversation.py +0 -332
- xinference/thirdparty/omnilmm/model/__init__.py +0 -1
- xinference/thirdparty/omnilmm/model/omnilmm.py +0 -595
- xinference/thirdparty/omnilmm/model/resampler.py +0 -166
- xinference/thirdparty/omnilmm/model/utils.py +0 -578
- xinference/thirdparty/omnilmm/train/train_utils.py +0 -150
- xinference/thirdparty/omnilmm/utils.py +0 -134
- xinference/web/ui/build/static/css/main.337afe76.css +0 -2
- xinference/web/ui/build/static/css/main.337afe76.css.map +0 -1
- xinference/web/ui/build/static/js/main.ae579a97.js +0 -3
- xinference/web/ui/build/static/js/main.ae579a97.js.map +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/12e02ee790dbf57ead09a241a93bb5f893393aa36628ca741d44390e836a103f.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/2fdc61dcb6a9d1fbcb44be592d0e87d8c3f21297a7327559ef5345665f8343f7.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/3d596a3e8dd6430d7ce81d164e32c31f8d47cfa5f725c328a298754d78563e14.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/5c08e2cd07809ed3e41486b16652253404cbb63a3ff8d0366ee50f57e2413cea.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/8472e58a31720892d534f3febda31f746b25ec4aa60787eef34217b074e67965.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/dc249829767b8abcbc3677e0b07b6d3ecbfdfe6d08cfe23a665eb33373a9aa9d.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/f91af913d7f91c410719ab13136aaed3aaf0f8dda06652f25c42cb5231587398.json +0 -1
- /xinference/{thirdparty/omnilmm → model/embedding/vllm}/__init__.py +0 -0
- /xinference/web/ui/build/static/js/{main.ae579a97.js.LICENSE.txt → main.8a9e3ba0.js.LICENSE.txt} +0 -0
- {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/entry_points.txt +0 -0
- {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/licenses/LICENSE +0 -0
- {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/top_level.txt +0 -0
|
@@ -191,42 +191,13 @@ def _get_pad_param(seq_len_idx: int, pad_len: int) -> Tuple:
|
|
|
191
191
|
return tuple(dimensions)
|
|
192
192
|
|
|
193
193
|
|
|
194
|
-
def _merge_kv_cache(
|
|
195
|
-
xinf_model_obj: "PytorchModel",
|
|
196
|
-
past_cache: DynamicCache,
|
|
197
|
-
new_cache: DynamicCache,
|
|
198
|
-
) -> DynamicCache:
|
|
199
|
-
from torch.nn.functional import pad
|
|
200
|
-
|
|
201
|
-
_, seq_len_idx = xinf_model_obj.get_batch_size_and_seq_len_indexes_from_kv()
|
|
202
|
-
past_seq_len = past_cache[0][0].shape[seq_len_idx]
|
|
203
|
-
new_seq_len = new_cache[0][0].shape[seq_len_idx]
|
|
204
|
-
if past_seq_len != new_seq_len:
|
|
205
|
-
padding_target = new_cache if past_seq_len > new_seq_len else past_cache
|
|
206
|
-
padding_len = abs(past_seq_len - new_seq_len)
|
|
207
|
-
pad_param = _get_pad_param(seq_len_idx, padding_len)
|
|
208
|
-
for idx in range(len(padding_target)):
|
|
209
|
-
k = padding_target.key_cache[idx]
|
|
210
|
-
v = padding_target.value_cache[idx]
|
|
211
|
-
_k = pad(k, pad_param)
|
|
212
|
-
_v = pad(v, pad_param)
|
|
213
|
-
padding_target.key_cache[idx] = _k
|
|
214
|
-
padding_target.value_cache[idx] = _v
|
|
215
|
-
|
|
216
|
-
ret_kv = DynamicCache()
|
|
217
|
-
for idx in range(len(past_cache)):
|
|
218
|
-
k1, k2 = new_cache.key_cache[idx], past_cache.key_cache[idx]
|
|
219
|
-
v1, v2 = new_cache.value_cache[idx], past_cache.value_cache[idx]
|
|
220
|
-
ret_kv.update(
|
|
221
|
-
torch.cat((k1, k2), 0).contiguous(),
|
|
222
|
-
torch.cat((v1, v2), 0).contiguous(),
|
|
223
|
-
idx,
|
|
224
|
-
)
|
|
225
|
-
return ret_kv
|
|
226
|
-
|
|
227
|
-
|
|
228
194
|
def get_batch_size_and_seq_len_from_kv_cache(kv, xinf_model_obj: "PytorchModel"):
|
|
195
|
+
from transformers import HybridCache
|
|
196
|
+
|
|
229
197
|
bs_idx, seq_len_idx = xinf_model_obj.get_batch_size_and_seq_len_indexes_from_kv()
|
|
198
|
+
|
|
199
|
+
if isinstance(kv, HybridCache):
|
|
200
|
+
return kv.key_cache[0].shape[bs_idx], kv.get_seq_length()
|
|
230
201
|
return kv[0][0].shape[bs_idx], kv[0][0].shape[seq_len_idx] + 1
|
|
231
202
|
|
|
232
203
|
|
|
@@ -304,9 +275,7 @@ def _batch_inference_one_step_internal(
|
|
|
304
275
|
if decode_reqs:
|
|
305
276
|
decode_kv = decode_reqs[0].kv_cache
|
|
306
277
|
# prefill and decode kv cache need to be merged at `batch_size` and `seq_len` dimensions.
|
|
307
|
-
merged_kv_cache =
|
|
308
|
-
xinf_model_obj, decode_kv, past_key_values
|
|
309
|
-
)
|
|
278
|
+
merged_kv_cache = xinf_model_obj.merge_kv_cache(decode_kv, past_key_values)
|
|
310
279
|
for r in valid_req_list:
|
|
311
280
|
r.kv_cache = merged_kv_cache
|
|
312
281
|
empty_cache()
|
xinference/model/llm/utils.py
CHANGED
|
@@ -709,6 +709,12 @@ class ChatModelMixin:
|
|
|
709
709
|
finish_reason = "tool_calls" if tool_calls else "stop"
|
|
710
710
|
|
|
711
711
|
content = ". ".join(failed_contents) if failed_contents else None
|
|
712
|
+
|
|
713
|
+
# fix: qwen tool_call content field return null
|
|
714
|
+
family = model_family.model_family or model_family.model_name
|
|
715
|
+
if tool_calls and family in QWEN_TOOL_CALL_FAMILY and content is None:
|
|
716
|
+
content = ""
|
|
717
|
+
|
|
712
718
|
d = {
|
|
713
719
|
"role": "assistant",
|
|
714
720
|
"content": content,
|
|
@@ -779,6 +785,11 @@ class ChatModelMixin:
|
|
|
779
785
|
failed_contents.append(content)
|
|
780
786
|
finish_reason = "tool_calls" if tool_calls else "stop"
|
|
781
787
|
|
|
788
|
+
# fix: qwen tool_call content field return null
|
|
789
|
+
family = model_family.model_family or model_family.model_name
|
|
790
|
+
if tool_calls and family in QWEN_TOOL_CALL_FAMILY and content is None:
|
|
791
|
+
content = ""
|
|
792
|
+
|
|
782
793
|
m = {
|
|
783
794
|
"role": "assistant",
|
|
784
795
|
"content": content,
|
|
@@ -199,7 +199,11 @@ if VLLM_INSTALLED and vllm.__version__ >= "0.5.1":
|
|
|
199
199
|
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-v2-chat-0628")
|
|
200
200
|
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-v2.5")
|
|
201
201
|
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-v3")
|
|
202
|
+
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-v3-0324")
|
|
202
203
|
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-r1")
|
|
204
|
+
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-r1-0528")
|
|
205
|
+
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-prover-v2")
|
|
206
|
+
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-r1-0528-qwen3")
|
|
203
207
|
|
|
204
208
|
if VLLM_INSTALLED and vllm.__version__ >= "0.5.3":
|
|
205
209
|
VLLM_SUPPORTED_CHAT_MODELS.append("gemma-2-it")
|
|
@@ -248,6 +252,9 @@ if VLLM_INSTALLED and vllm.__version__ >= "0.8.4":
|
|
|
248
252
|
if VLLM_INSTALLED and vllm.__version__ >= "0.8.5":
|
|
249
253
|
VLLM_SUPPORTED_CHAT_MODELS.append("qwen3")
|
|
250
254
|
|
|
255
|
+
if VLLM_INSTALLED and vllm.__version__ >= "0.9.1":
|
|
256
|
+
VLLM_SUPPORTED_CHAT_MODELS.append("minicpm4")
|
|
257
|
+
|
|
251
258
|
|
|
252
259
|
class VLLMModel(LLM):
|
|
253
260
|
def __init__(
|
xinference/model/rerank/core.py
CHANGED
|
@@ -31,6 +31,7 @@ from ...device_utils import empty_cache
|
|
|
31
31
|
from ...types import Document, DocumentObj, Rerank, RerankTokens
|
|
32
32
|
from ..core import CacheableModelSpec, ModelDescription, VirtualEnvSettings
|
|
33
33
|
from ..utils import is_model_cached
|
|
34
|
+
from .utils import preprocess_sentence
|
|
34
35
|
|
|
35
36
|
logger = logging.getLogger(__name__)
|
|
36
37
|
|
|
@@ -201,7 +202,10 @@ class RerankModel:
|
|
|
201
202
|
)
|
|
202
203
|
self._use_fp16 = True
|
|
203
204
|
|
|
204
|
-
if
|
|
205
|
+
if (
|
|
206
|
+
self._model_spec.type == "normal"
|
|
207
|
+
and "qwen3" not in self._model_spec.model_name.lower()
|
|
208
|
+
):
|
|
205
209
|
try:
|
|
206
210
|
import sentence_transformers
|
|
207
211
|
from sentence_transformers.cross_encoder import CrossEncoder
|
|
@@ -229,6 +233,65 @@ class RerankModel:
|
|
|
229
233
|
)
|
|
230
234
|
if self._use_fp16:
|
|
231
235
|
self._model.model.half()
|
|
236
|
+
elif "qwen3" in self._model_spec.model_name.lower():
|
|
237
|
+
# qwen3-reranker
|
|
238
|
+
# now we use transformers
|
|
239
|
+
# TODO: support engines for rerank models
|
|
240
|
+
try:
|
|
241
|
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
242
|
+
except ImportError:
|
|
243
|
+
error_message = "Failed to import module 'transformers'"
|
|
244
|
+
installation_guide = [
|
|
245
|
+
"Please make sure 'transformers' is installed. ",
|
|
246
|
+
"You can install it by `pip install transformers`\n",
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
raise ImportError(f"{error_message}\n\n{''.join(installation_guide)}")
|
|
250
|
+
|
|
251
|
+
tokenizer = AutoTokenizer.from_pretrained(
|
|
252
|
+
self._model_path, padding_side="left"
|
|
253
|
+
)
|
|
254
|
+
model = self._model = AutoModelForCausalLM.from_pretrained(
|
|
255
|
+
self._model_path
|
|
256
|
+
).eval()
|
|
257
|
+
max_length = getattr(self._model_spec, "max_tokens")
|
|
258
|
+
|
|
259
|
+
prefix = '<|im_start|>system\nJudge whether the Document meets the requirements based on the Query and the Instruct provided. Note that the answer can only be "yes" or "no".<|im_end|>\n<|im_start|>user\n'
|
|
260
|
+
suffix = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
|
|
261
|
+
prefix_tokens = tokenizer.encode(prefix, add_special_tokens=False)
|
|
262
|
+
suffix_tokens = tokenizer.encode(suffix, add_special_tokens=False)
|
|
263
|
+
|
|
264
|
+
def process_inputs(pairs):
|
|
265
|
+
inputs = tokenizer(
|
|
266
|
+
pairs,
|
|
267
|
+
padding=False,
|
|
268
|
+
truncation="longest_first",
|
|
269
|
+
return_attention_mask=False,
|
|
270
|
+
max_length=max_length - len(prefix_tokens) - len(suffix_tokens),
|
|
271
|
+
)
|
|
272
|
+
for i, ele in enumerate(inputs["input_ids"]):
|
|
273
|
+
inputs["input_ids"][i] = prefix_tokens + ele + suffix_tokens
|
|
274
|
+
inputs = tokenizer.pad(
|
|
275
|
+
inputs, padding=True, return_tensors="pt", max_length=max_length
|
|
276
|
+
)
|
|
277
|
+
for key in inputs:
|
|
278
|
+
inputs[key] = inputs[key].to(model.device)
|
|
279
|
+
return inputs
|
|
280
|
+
|
|
281
|
+
token_false_id = tokenizer.convert_tokens_to_ids("no")
|
|
282
|
+
token_true_id = tokenizer.convert_tokens_to_ids("yes")
|
|
283
|
+
|
|
284
|
+
def compute_logits(inputs, **kwargs):
|
|
285
|
+
batch_scores = model(**inputs).logits[:, -1, :]
|
|
286
|
+
true_vector = batch_scores[:, token_true_id]
|
|
287
|
+
false_vector = batch_scores[:, token_false_id]
|
|
288
|
+
batch_scores = torch.stack([false_vector, true_vector], dim=1)
|
|
289
|
+
batch_scores = torch.nn.functional.log_softmax(batch_scores, dim=1)
|
|
290
|
+
scores = batch_scores[:, 1].exp().tolist()
|
|
291
|
+
return scores
|
|
292
|
+
|
|
293
|
+
self.process_inputs = process_inputs
|
|
294
|
+
self.compute_logits = compute_logits
|
|
232
295
|
else:
|
|
233
296
|
try:
|
|
234
297
|
if self._model_spec.type == "LLM-based":
|
|
@@ -265,10 +328,18 @@ class RerankModel:
|
|
|
265
328
|
if max_chunks_per_doc is not None:
|
|
266
329
|
raise ValueError("rerank hasn't support `max_chunks_per_doc` parameter.")
|
|
267
330
|
logger.info("Rerank with kwargs: %s, model: %s", kwargs, self._model)
|
|
268
|
-
|
|
331
|
+
|
|
332
|
+
pre_query = preprocess_sentence(
|
|
333
|
+
query, kwargs.get("instruction", None), self._model_spec.model_name
|
|
334
|
+
)
|
|
335
|
+
sentence_combinations = [[pre_query, doc] for doc in documents]
|
|
269
336
|
# reset n tokens
|
|
270
337
|
self._model.model.n_tokens = 0
|
|
271
|
-
if
|
|
338
|
+
if (
|
|
339
|
+
self._model_spec.type == "normal"
|
|
340
|
+
and "qwen3" not in self._model_spec.model_name.lower()
|
|
341
|
+
):
|
|
342
|
+
logger.debug("Passing processed sentences: %s", sentence_combinations)
|
|
272
343
|
similarity_scores = self._model.predict(
|
|
273
344
|
sentence_combinations,
|
|
274
345
|
convert_to_numpy=False,
|
|
@@ -277,6 +348,23 @@ class RerankModel:
|
|
|
277
348
|
).cpu()
|
|
278
349
|
if similarity_scores.dtype == torch.bfloat16:
|
|
279
350
|
similarity_scores = similarity_scores.float()
|
|
351
|
+
elif "qwen3" in self._model_spec.model_name.lower():
|
|
352
|
+
|
|
353
|
+
def format_instruction(instruction, query, doc):
|
|
354
|
+
if instruction is None:
|
|
355
|
+
instruction = "Given a web search query, retrieve relevant passages that answer the query"
|
|
356
|
+
output = "<Instruct>: {instruction}\n<Query>: {query}\n<Document>: {doc}".format(
|
|
357
|
+
instruction=instruction, query=query, doc=doc
|
|
358
|
+
)
|
|
359
|
+
return output
|
|
360
|
+
|
|
361
|
+
pairs = [
|
|
362
|
+
format_instruction(kwargs.get("instruction", None), query, doc)
|
|
363
|
+
for doc in documents
|
|
364
|
+
]
|
|
365
|
+
# Tokenize the input texts
|
|
366
|
+
inputs = self.process_inputs(pairs)
|
|
367
|
+
similarity_scores = self.compute_logits(inputs)
|
|
280
368
|
else:
|
|
281
369
|
# Related issue: https://github.com/xorbitsai/inference/issues/1775
|
|
282
370
|
similarity_scores = self._model.compute_score(
|
|
@@ -62,5 +62,29 @@
|
|
|
62
62
|
"max_tokens": 1024,
|
|
63
63
|
"model_id": "openbmb/MiniCPM-Reranker",
|
|
64
64
|
"model_revision": "5d2fd7345b6444c89d4c0fa59c92272888f3f2d0"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"model_name": "Qwen3-Reranker-0.6B",
|
|
68
|
+
"type": "normal",
|
|
69
|
+
"language": ["en", "zh"],
|
|
70
|
+
"max_tokens": 40960,
|
|
71
|
+
"model_id": "Qwen/Qwen3-Reranker-0.6B",
|
|
72
|
+
"model_revision": "6e9e69830b95c52b5fd889b7690dda3329508de3"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"model_name": "Qwen3-Reranker-4B",
|
|
76
|
+
"type": "normal",
|
|
77
|
+
"language": ["en", "zh"],
|
|
78
|
+
"max_tokens": 40960,
|
|
79
|
+
"model_id": "Qwen/Qwen3-Reranker-4B",
|
|
80
|
+
"model_revision": "f16fc5d5d2b9b1d0db8280929242745d79794ef5"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"model_name": "Qwen3-Reranker-8B",
|
|
84
|
+
"type": "normal",
|
|
85
|
+
"language": ["en", "zh"],
|
|
86
|
+
"max_tokens": 40960,
|
|
87
|
+
"model_id": "Qwen/Qwen3-Reranker-8B",
|
|
88
|
+
"model_revision": "5fa94080caafeaa45a15d11f969d7978e087a3db"
|
|
65
89
|
}
|
|
66
90
|
]
|
|
@@ -57,5 +57,29 @@
|
|
|
57
57
|
"max_tokens": 1024,
|
|
58
58
|
"model_id": "OpenBMB/MiniCPM-Reranker",
|
|
59
59
|
"model_hub": "modelscope"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"model_name": "Qwen3-Reranker-0.6B",
|
|
63
|
+
"type": "normal",
|
|
64
|
+
"language": ["en", "zh"],
|
|
65
|
+
"max_tokens": 40960,
|
|
66
|
+
"model_id": "Qwen/Qwen3-Reranker-0.6B",
|
|
67
|
+
"model_hub": "modelscope"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"model_name": "Qwen3-Reranker-4B",
|
|
71
|
+
"type": "normal",
|
|
72
|
+
"language": ["en", "zh"],
|
|
73
|
+
"max_tokens": 40960,
|
|
74
|
+
"model_id": "Qwen/Qwen3-Reranker-4B",
|
|
75
|
+
"model_hub": "modelscope"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"model_name": "Qwen3-Reranker-8B",
|
|
79
|
+
"type": "normal",
|
|
80
|
+
"language": ["en", "zh"],
|
|
81
|
+
"max_tokens": 40960,
|
|
82
|
+
"model_id": "Qwen/Qwen3-Reranker-8B",
|
|
83
|
+
"model_hub": "modelscope"
|
|
60
84
|
}
|
|
61
85
|
]
|
xinference/model/rerank/utils.py
CHANGED
|
@@ -11,8 +11,26 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
from
|
|
14
|
+
from typing import TYPE_CHECKING, Any
|
|
15
15
|
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from .core import RerankModelSpec
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
|
|
20
|
+
def get_model_version(rerank_model: "RerankModelSpec") -> str:
|
|
18
21
|
return rerank_model.model_name
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
instruction_cfg = {
|
|
25
|
+
"minicpm-reranker": "Query: ",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def preprocess_sentence(query: str, instruction: Any, model_name: str) -> str:
|
|
30
|
+
if instruction and isinstance(instruction, str):
|
|
31
|
+
return f"{instruction}{query}"
|
|
32
|
+
if instruction is None:
|
|
33
|
+
for k, v in instruction_cfg.items():
|
|
34
|
+
if k.lower() in model_name.lower():
|
|
35
|
+
return f"{v}{query}"
|
|
36
|
+
return query
|
xinference/model/utils.py
CHANGED
|
@@ -18,9 +18,10 @@ import logging
|
|
|
18
18
|
import os
|
|
19
19
|
import random
|
|
20
20
|
import threading
|
|
21
|
+
from copy import deepcopy
|
|
21
22
|
from json import JSONDecodeError
|
|
22
23
|
from pathlib import Path
|
|
23
|
-
from typing import Any, Callable, Dict, Optional, Set, Tuple, Type, Union
|
|
24
|
+
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
|
|
24
25
|
|
|
25
26
|
import huggingface_hub
|
|
26
27
|
import numpy as np
|
|
@@ -460,3 +461,39 @@ class CancellableDownloader:
|
|
|
460
461
|
self.unpatch_tqdm()
|
|
461
462
|
self._done_event.set()
|
|
462
463
|
self.reset()
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
def get_engine_params_by_name(
|
|
467
|
+
model_type: Optional[str], model_name: str
|
|
468
|
+
) -> Optional[Dict[str, List[dict]]]:
|
|
469
|
+
if model_type == "LLM":
|
|
470
|
+
from .llm.llm_family import LLM_ENGINES
|
|
471
|
+
|
|
472
|
+
if model_name not in LLM_ENGINES:
|
|
473
|
+
return None
|
|
474
|
+
|
|
475
|
+
# filter llm_class
|
|
476
|
+
engine_params = deepcopy(LLM_ENGINES[model_name])
|
|
477
|
+
for engine, params in engine_params.items():
|
|
478
|
+
for param in params:
|
|
479
|
+
del param["llm_class"]
|
|
480
|
+
|
|
481
|
+
return engine_params
|
|
482
|
+
elif model_type == "embedding":
|
|
483
|
+
from .embedding.embed_family import EMBEDDING_ENGINES
|
|
484
|
+
|
|
485
|
+
if model_name not in EMBEDDING_ENGINES:
|
|
486
|
+
return None
|
|
487
|
+
|
|
488
|
+
# filter embedding_class
|
|
489
|
+
engine_params = deepcopy(EMBEDDING_ENGINES[model_name])
|
|
490
|
+
for engine, params in engine_params.items():
|
|
491
|
+
for param in params:
|
|
492
|
+
del param["embedding_class"]
|
|
493
|
+
|
|
494
|
+
return engine_params
|
|
495
|
+
else:
|
|
496
|
+
raise ValueError(
|
|
497
|
+
f"Cannot support model_engine for {model_type}, "
|
|
498
|
+
f"only available for LLM, embedding"
|
|
499
|
+
)
|
|
@@ -121,7 +121,10 @@ class DiffusersVideoModel:
|
|
|
121
121
|
self._model_path, **kwargs
|
|
122
122
|
)
|
|
123
123
|
else:
|
|
124
|
-
assert
|
|
124
|
+
assert (
|
|
125
|
+
"image2video" in self.model_spec.model_ability
|
|
126
|
+
or "firstlastframe2video" in self.model_spec.model_ability
|
|
127
|
+
)
|
|
125
128
|
|
|
126
129
|
image_encoder = CLIPVisionModel.from_pretrained(
|
|
127
130
|
self._model_path,
|
|
@@ -252,7 +255,7 @@ class DiffusersVideoModel:
|
|
|
252
255
|
|
|
253
256
|
def image_to_video(
|
|
254
257
|
self,
|
|
255
|
-
image: PIL.Image,
|
|
258
|
+
image: PIL.Image.Image,
|
|
256
259
|
prompt: str,
|
|
257
260
|
n: int = 1,
|
|
258
261
|
num_inference_steps: Optional[int] = None,
|
|
@@ -284,7 +287,49 @@ class DiffusersVideoModel:
|
|
|
284
287
|
)
|
|
285
288
|
return self._output_to_video(output, fps, response_format)
|
|
286
289
|
|
|
287
|
-
def
|
|
290
|
+
def firstlastframe_to_video(
|
|
291
|
+
self,
|
|
292
|
+
first_frame: PIL.Image.Image,
|
|
293
|
+
last_frame: PIL.Image.Image,
|
|
294
|
+
prompt: str,
|
|
295
|
+
n: int = 1,
|
|
296
|
+
num_inference_steps: Optional[int] = None,
|
|
297
|
+
response_format: str = "b64_json",
|
|
298
|
+
**kwargs,
|
|
299
|
+
):
|
|
300
|
+
assert self._model is not None
|
|
301
|
+
assert callable(self._model)
|
|
302
|
+
generate_kwargs = self._model_spec.default_generate_config.copy()
|
|
303
|
+
generate_kwargs.update(kwargs)
|
|
304
|
+
generate_kwargs["num_videos_per_prompt"] = n
|
|
305
|
+
if num_inference_steps:
|
|
306
|
+
generate_kwargs["num_inference_steps"] = num_inference_steps
|
|
307
|
+
fps = generate_kwargs.pop("fps", 10)
|
|
308
|
+
|
|
309
|
+
# process first and last frame
|
|
310
|
+
max_area = generate_kwargs.pop("max_area")
|
|
311
|
+
if isinstance(max_area, str):
|
|
312
|
+
max_area = [int(v) for v in max_area.split("*")]
|
|
313
|
+
max_area = reduce(operator.mul, max_area, 1)
|
|
314
|
+
first_frame = self._process_image(first_frame, max_area)
|
|
315
|
+
width, height = first_frame.size
|
|
316
|
+
if last_frame.size != first_frame.size:
|
|
317
|
+
last_frame = self._center_crop_resize(last_frame, height, width)
|
|
318
|
+
|
|
319
|
+
generate_kwargs.pop("width", None)
|
|
320
|
+
generate_kwargs.pop("height", None)
|
|
321
|
+
self._process_progressor(generate_kwargs)
|
|
322
|
+
output = self._model(
|
|
323
|
+
image=first_frame,
|
|
324
|
+
last_image=last_frame,
|
|
325
|
+
prompt=prompt,
|
|
326
|
+
height=height,
|
|
327
|
+
width=width,
|
|
328
|
+
**generate_kwargs,
|
|
329
|
+
)
|
|
330
|
+
return self._output_to_video(output, fps, response_format)
|
|
331
|
+
|
|
332
|
+
def _process_image(self, image: PIL.Image.Image, max_area: int) -> PIL.Image.Image:
|
|
288
333
|
assert self._model is not None
|
|
289
334
|
aspect_ratio = image.height / image.width
|
|
290
335
|
mod_value = (
|
|
@@ -295,6 +340,23 @@ class DiffusersVideoModel:
|
|
|
295
340
|
width = round(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
|
|
296
341
|
return image.resize((width, height))
|
|
297
342
|
|
|
343
|
+
@classmethod
|
|
344
|
+
def _center_crop_resize(
|
|
345
|
+
cls, image: PIL.Image.Image, height: int, width: int
|
|
346
|
+
) -> PIL.Image.Image:
|
|
347
|
+
import torchvision.transforms.functional as TF
|
|
348
|
+
|
|
349
|
+
# Calculate resize ratio to match first frame dimensions
|
|
350
|
+
resize_ratio = max(width / image.width, height / image.height)
|
|
351
|
+
|
|
352
|
+
# Resize the image
|
|
353
|
+
width = round(image.width * resize_ratio)
|
|
354
|
+
height = round(image.height * resize_ratio)
|
|
355
|
+
size = [width, height]
|
|
356
|
+
image = TF.center_crop(image, size)
|
|
357
|
+
|
|
358
|
+
return image
|
|
359
|
+
|
|
298
360
|
def _output_to_video(self, output: Any, fps: int, response_format: str):
|
|
299
361
|
import gc
|
|
300
362
|
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"ftfy",
|
|
66
66
|
"imageio-ffmpeg",
|
|
67
67
|
"imageio",
|
|
68
|
-
"
|
|
68
|
+
"#system_numpy#"
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"ftfy",
|
|
89
89
|
"imageio-ffmpeg",
|
|
90
90
|
"imageio",
|
|
91
|
-
"
|
|
91
|
+
"#system_numpy#"
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
},
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"ftfy",
|
|
116
116
|
"imageio-ffmpeg",
|
|
117
117
|
"imageio",
|
|
118
|
-
"
|
|
118
|
+
"#system_numpy#"
|
|
119
119
|
]
|
|
120
120
|
}
|
|
121
121
|
},
|
|
@@ -142,7 +142,34 @@
|
|
|
142
142
|
"ftfy",
|
|
143
143
|
"imageio-ffmpeg",
|
|
144
144
|
"imageio",
|
|
145
|
-
"
|
|
145
|
+
"#system_numpy#"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"model_name": "Wan2.1-flf2v-14B-720p",
|
|
151
|
+
"model_family": "Wan",
|
|
152
|
+
"model_id": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers",
|
|
153
|
+
"model_revision": "17c30769b1e0b5dcaa1799b117bf20a9c31f59d7",
|
|
154
|
+
"model_ability": [
|
|
155
|
+
"firstlastframe2video"
|
|
156
|
+
],
|
|
157
|
+
"default_model_config": {
|
|
158
|
+
"torch_dtype": "bfloat16"
|
|
159
|
+
},
|
|
160
|
+
"default_generate_config": {
|
|
161
|
+
"max_area": [
|
|
162
|
+
720,
|
|
163
|
+
1280
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"virtualenv": {
|
|
167
|
+
"packages": [
|
|
168
|
+
"git+https://github.com/huggingface/diffusers",
|
|
169
|
+
"ftfy",
|
|
170
|
+
"imageio-ffmpeg",
|
|
171
|
+
"imageio",
|
|
172
|
+
"#system_numpy#"
|
|
146
173
|
]
|
|
147
174
|
}
|
|
148
175
|
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"ftfy",
|
|
70
70
|
"imageio-ffmpeg",
|
|
71
71
|
"imageio",
|
|
72
|
-
"
|
|
72
|
+
"#system_numpy#"
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
},
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"ftfy",
|
|
94
94
|
"imageio-ffmpeg",
|
|
95
95
|
"imageio",
|
|
96
|
-
"
|
|
96
|
+
"#system_numpy#"
|
|
97
97
|
]
|
|
98
98
|
}
|
|
99
99
|
},
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"ftfy",
|
|
122
122
|
"imageio-ffmpeg",
|
|
123
123
|
"imageio",
|
|
124
|
-
"
|
|
124
|
+
"#system_numpy#"
|
|
125
125
|
]
|
|
126
126
|
}
|
|
127
127
|
},
|
|
@@ -149,7 +149,35 @@
|
|
|
149
149
|
"ftfy",
|
|
150
150
|
"imageio-ffmpeg",
|
|
151
151
|
"imageio",
|
|
152
|
-
"
|
|
152
|
+
"#system_numpy#"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"model_name": "Wan2.1-flf2v-14B-720p",
|
|
158
|
+
"model_family": "Wan",
|
|
159
|
+
"model_hub": "modelscope",
|
|
160
|
+
"model_id": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers",
|
|
161
|
+
"model_revision": "master",
|
|
162
|
+
"model_ability": [
|
|
163
|
+
"firstlastframe2video"
|
|
164
|
+
],
|
|
165
|
+
"default_model_config": {
|
|
166
|
+
"torch_dtype": "bfloat16"
|
|
167
|
+
},
|
|
168
|
+
"default_generate_config": {
|
|
169
|
+
"max_area": [
|
|
170
|
+
720,
|
|
171
|
+
1280
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"virtualenv": {
|
|
175
|
+
"packages": [
|
|
176
|
+
"git+https://github.com/huggingface/diffusers",
|
|
177
|
+
"ftfy",
|
|
178
|
+
"imageio-ffmpeg",
|
|
179
|
+
"imageio",
|
|
180
|
+
"#system_numpy#"
|
|
153
181
|
]
|
|
154
182
|
}
|
|
155
183
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.css": "./static/css/main.
|
|
4
|
-
"main.js": "./static/js/main.
|
|
3
|
+
"main.css": "./static/css/main.013f296b.css",
|
|
4
|
+
"main.js": "./static/js/main.8a9e3ba0.js",
|
|
5
5
|
"static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
|
|
6
6
|
"index.html": "./index.html",
|
|
7
|
-
"main.
|
|
8
|
-
"main.
|
|
7
|
+
"main.013f296b.css.map": "./static/css/main.013f296b.css.map",
|
|
8
|
+
"main.8a9e3ba0.js.map": "./static/js/main.8a9e3ba0.js.map"
|
|
9
9
|
},
|
|
10
10
|
"entrypoints": [
|
|
11
|
-
"static/css/main.
|
|
12
|
-
"static/js/main.
|
|
11
|
+
"static/css/main.013f296b.css",
|
|
12
|
+
"static/js/main.8a9e3ba0.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.
|
|
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.8a9e3ba0.js"></script><link href="./static/css/main.013f296b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.container{cursor:pointer;display:block}.container,.descriptionCard{border-radius:20px;height:300px;position:relative;width:300px}.descriptionCard{left:-1px;padding:20px;top:-1px}.cardTitle{display:flex;justify-content:space-between}.iconButtonBox{align-items:center;display:flex}.drawerCard{min-height:100%;min-width:350px;padding:20px 80px 0;position:relative;width:60vw}.p{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;font-size:14px;overflow:hidden;padding:0 10px;text-overflow:ellipsis;word-break:break-word}.pasteText{color:#1976d2;cursor:pointer;font-size:18px!important;margin-inline:10px}.pasteText:hover{color:#1976d2b3}.copyToCommandLine{color:#1976d2;cursor:pointer;font-size:16px!important}.copyToCommandLine:hover{color:#1976d2b3}.formContainer{height:80%;overflow:scroll;padding:0 10px 160px}.buttonsContainer{bottom:50px;left:100px;position:absolute;right:100px}.buttons{align-items:center;display:flex;gap:20px;justify-content:space-between}.css-1be5mm1-MuiLinearProgress-root-MuiMobileStepper-progress,.css-r5rjnf-MuiLinearProgress-root-MuiMobileStepper-progress{width:100%!important}.instructionText{color:#666;font-size:12px;font-style:italic;margin:30px 0;text-align:center}.iconRow{bottom:20px;justify-content:space-between;left:20px;position:absolute;right:20px}.iconItem,.iconRow{align-items:center;display:flex}.iconItem{flex-direction:column;margin:20px}.boldIconText{font-size:1.2em;font-weight:700}.muiIcon{font-size:1.5em}.smallText{font-size:.8em}.dialogBox{height:607px;margin:32px;overflow-x:scroll;width:1241px}.dialogTitle{display:flex;justify-content:space-between;padding:20px 20px 7px}.dialogTitle-model_name{font-size:18px;font-weight:700}.pathBox{cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:160px}.pathBox2{width:300px}.empty{color:#555;font-size:20px;left:50%;position:absolute;top:30%;-webkit-transform:translate(-50%);transform:translate(-50%)}.deleteDialog{align-items:center;display:flex}.warningIcon{color:#ed6c02;margin-right:10px}.jsonDialog{border-radius:8px;color:#000;display:flex;flex-direction:column;padding:10px 30px}.jsonDialog-title{align-items:center;display:flex;justify-content:space-between;margin:10px 0 20px}.title-name{font-size:16px;font-weight:700}.main-box{height:500px;width:700px}.but-box{display:flex;justify-content:end;margin-top:20px}.drawer{bottom:0;left:0;opacity:0;position:fixed;right:0;top:0;transition:visibility .3s ease,opacity .3s ease;visibility:hidden;z-index:1000}.drawer.open{opacity:1;visibility:visible}.drawer-overlay{background-color:rgba(0,0,0,.5);left:0;z-index:999}.drawer-content,.drawer-overlay{bottom:0;position:absolute;right:0;top:0}.drawer-content{background-color:#fff;box-shadow:-2px 0 10px rgba(0,0,0,.1);overflow-y:auto;-webkit-transform:translateX(100%);transform:translateX(100%);transition:-webkit-transform .3s ease;transition:transform .3s ease;transition:transform .3s ease,-webkit-transform .3s ease;z-index:1000}.drawer.open .drawer-content{-webkit-transform:translateX(0);transform:translateX(0)}.textHighlight .MuiInputBase-input,.textHighlight .MuiSelect-select{color:#1976d2}.copyText{color:#666;cursor:pointer;font-size:14px!important}.copyText:hover{color:#1976d2}.formBox{max-height:80vh;max-width:50vw;min-width:50vw;overflow:auto;padding:40px 20px 0 0;position:relative;transition:all .4s ease-in-out}.broaden{max-width:100%;min-width:100%;padding-right:0}.show-json{align-items:center;display:flex;right:60px;top:90px}.icon,.show-json{position:absolute}.icon{cursor:pointer;margin-left:20px;right:-40px}.icon:hover{color:#1976d2}.arrow{font-size:24px!important}.jsonBox{min-height:80vh;position:relative;transition:all .4s ease-in-out;width:100%}.hide{overflow:hidden;-webkit-transform:translate(30vw);transform:translate(30vw);width:0}.checkboxWrapper{align-items:center;display:flex;flex-wrap:wrap;width:100%}.jsonBox-header{align-items:center;display:flex;justify-content:space-between}.jsonBox-title{font-weight:700;line-height:40px}.textarea{background-color:initial;border:1px solid #ddd;border-radius:5px;color:#666;height:calc(100% - 40px);padding:5px 10px;resize:none;width:100%}.addBtn{margin-left:20px!important}.item{border:1px solid #ddd;border-radius:10px;margin:10px 50px 0;overflow:hidden;padding:20px;position:relative}.item:hover .deleteBtn{-webkit-transform:translateX(-50px);transform:translateX(-50px)}.deleteBtn{background-color:#1976d2;border-radius:25px;height:50px;line-height:70px;position:absolute;right:20px;text-align:center;top:calc(50% - 25px);-webkit-transform:translateX(80px);transform:translateX(80px);transition:all .3s ease-in-out;width:50px}.deleteBtn:hover{box-shadow:0 0 10px #aaa;cursor:pointer}.deleteIcon{color:#fff;font-size:28px!important}.chat_template_box{align-items:start;display:flex;gap:10px}.chat_template_test{width:30%}.chat_template_test_mainBox{border:1px solid #ccc;border-radius:4px;height:137px;overflow:scroll;padding:10px}.chat_template_test_tip{color:rgba(0,0,0,.6);font-size:10px;margin:4px 14px 0}.test_res_box{border:1px solid #ddd;border-radius:4px;margin-top:5px;min-height:55px;padding:10px}.css-19qh8xo-MuiInputBase-input-MuiOutlinedInput-input.Mui-disabled{-webkit-text-fill-color:#000!important}
|
|
2
|
+
/*# sourceMappingURL=main.013f296b.css.map*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/css/main.013f296b.css","mappings":"AAAA,WAKE,cAAe,CAJf,aAMF,CACA,4BAFE,kBAAmB,CAFnB,YAAa,CAFb,iBAAkB,CAClB,WAaF,CARA,iBAGE,SAAU,CAGV,YAAa,CAJb,QAMF,CACA,WACE,YAAa,CACb,6BACF,CACA,eAEE,kBAAmB,CADnB,YAEF,CACA,YAGE,eAAgB,CAEhB,eAAgB,CAHhB,mBAAoB,CADpB,iBAAkB,CAGlB,UAEF,CACA,GAEE,oBAAqB,CACrB,2BAA4B,CAF5B,mBAAoB,CAMpB,cAAe,CAHf,eAAgB,CAIhB,cAAiB,CAHjB,sBAAuB,CACvB,qBAGF,CACA,WAEE,aAAc,CACd,cAAe,CAFf,wBAA0B,CAG1B,kBACF,CACA,iBACE,eACF,CACA,mBAEE,aAAc,CACd,cAAe,CAFf,wBAGF,CACA,yBACE,eACF,CACA,eACE,UAAW,CACX,eAAgB,CAEhB,oBACF,CACA,kBAEE,WAAY,CACZ,UAAW,CAFX,iBAAkB,CAGlB,WACF,CACA,SAGE,kBAAmB,CAFnB,YAAa,CAGb,QAAS,CAFT,6BAGF,CAIA,2HACE,oBACF,CACA,iBAEE,UAAc,CADd,cAAe,CAEf,iBAAkB,CAClB,aAAc,CACd,iBACF,CACA,SAEE,WAAY,CAIZ,6BAA8B,CAH9B,SAAU,CAFV,iBAAkB,CAGlB,UAIF,CACA,mBAFE,kBAAmB,CAFnB,YASF,CALA,UAEE,qBAAsB,CAEtB,WACF,CACA,cAEE,eAAgB,CADhB,eAEF,CACA,SACE,eACF,CACA,WACE,cACF,CACA,WAEE,YAAa,CACb,WAAY,CACZ,iBAAkB,CAHlB,YAIF,CACA,aACE,YAAa,CACb,6BAA8B,CAC9B,qBACF,CACA,wBACE,cAAe,CACf,eACF,CACA,SAEE,cAAe,CACf,eAAgB,CAEhB,sBAAuB,CADvB,kBAAmB,CAHnB,WAKF,CACA,UACE,WACF,CACA,OAKE,UAAW,CADX,cAAe,CAFf,QAAS,CADT,iBAAkB,CAElB,OAAQ,CAGR,iCAA6B,CAA7B,yBACF,CACA,cAEE,kBAAmB,CADnB,YAEF,CACA,aAEE,aAAuB,CADvB,iBAEF,CACA,YAKE,iBAAkB,CADlB,UAAW,CAHX,YAAa,CACb,qBAAsB,CACtB,iBAGF,CACA,kBAGE,kBAAmB,CAFnB,YAAa,CACb,6BAA8B,CAE9B,kBACF,CACA,YACE,cAAe,CACf,eACF,CACA,UAEE,YAAa,CADb,WAEF,CACA,SACE,YAAa,CACb,mBAAoB,CACpB,eACF,CACA,QAKE,QAAS,CACT,MAAO,CAEP,SAAU,CANV,cAAe,CAEf,OAAQ,CADR,KAAM,CAMN,+CAAmD,CAFnD,iBAAkB,CANlB,YASF,CACA,aAEE,SAAU,CADV,kBAEF,CACA,gBAME,+BAAoC,CADpC,MAAO,CAEP,WACF,CACA,gCALE,QAAS,CAHT,iBAAkB,CAElB,OAAQ,CADR,KAkBF,CAXA,gBAKE,qBAAuB,CAEvB,qCAA0C,CAG1C,eAAgB,CADhB,kCAA2B,CAA3B,0BAA2B,CAD3B,qCAA+B,CAA/B,6BAA+B,CAA/B,wDAA+B,CAF/B,YAKF,CACA,6BACE,+BAAwB,CAAxB,uBACF,CAIA,oEACE,aACF,CClOA,UAEE,UAAW,CACX,cAAe,CAFf,wBAGF,CAEA,gBACE,aACF,CCRA,SAIE,eAAgB,CAFhB,cAAe,CACf,cAAe,CAEf,aAAc,CACd,qBAAsB,CALtB,iBAAkB,CAMlB,8BACF,CAEA,SACE,cAAe,CACf,cAAe,CACf,eACF,CAEA,WAEE,kBAAmB,CADnB,YAAa,CAIb,UAAW,CADX,QAEF,CAEA,iBALE,iBAUF,CALA,MAGE,cAAe,CACf,gBAAiB,CAFjB,WAGF,CAEA,YACE,aACF,CAEA,OACE,wBACF,CAEA,SAEE,eAAgB,CADhB,iBAAkB,CAGlB,8BAAgC,CADhC,UAEF,CAEA,MAGE,eAAgB,CADhB,iCAA6B,CAA7B,yBAA6B,CAD7B,OAGF,CAEA,iBAGE,kBAAmB,CAFnB,YAAa,CACb,cAAe,CAEf,UACF,CAEA,gBAGE,kBAAmB,CAFnB,YAAa,CACb,6BAEF,CAEA,eAEE,eAAgB,CADhB,gBAEF,CAEA,UAQE,wBAA6B,CAJ7B,qBAAsB,CACtB,iBAAkB,CAElB,UAAW,CALX,wBAAyB,CACzB,gBAAiB,CAGjB,WAAY,CALZ,UAQF,CAEA,QACE,0BACF,CAEA,MAEE,qBAAsB,CAGtB,kBAAmB,CAFnB,kBAAmB,CAGnB,eAAgB,CAFhB,YAAa,CAHb,iBAMF,CAEA,uBACE,mCAA4B,CAA5B,2BACF,CAEA,WAUE,wBAAyB,CADzB,kBAAmB,CAJnB,WAAY,CAGZ,gBAAiB,CAPjB,iBAAkB,CAClB,UAAW,CAKX,iBAAkB,CAJlB,oBAAqB,CAGrB,kCAA2B,CAA3B,0BAA2B,CAK3B,8BAAgC,CAPhC,UAQF,CAEA,iBAEE,wBAAyB,CADzB,cAEF,CAEA,YAEE,UAAW,CADX,wBAEF,CAEA,mBAEE,iBAAkB,CADlB,YAAa,CAEb,QACF,CAEA,oBACE,SACF,CAEA,4BAGE,qBAAsB,CACtB,iBAAkB,CAHlB,YAAa,CAIb,eAAgB,CAHhB,YAIF,CAEA,wBAGE,oBAAyB,CAFzB,cAAe,CACf,iBAEF,CAEA,cACE,qBAAsB,CAItB,iBAAkB,CADlB,cAAe,CAFf,eAAgB,CAChB,YAGF,CAEA,oEACE,sCACF","sources":["scenes/launch_model/styles/modelCardStyle.css","components/copyComponent/style.css","scenes/register_model/styles/registerModelStyle.css"],"sourcesContent":[".container {\n display: block;\n position: relative;\n width: 300px;\n height: 300px;\n cursor: pointer;\n border-radius: 20px;\n}\n.descriptionCard {\n position: relative;\n top: -1px;\n left: -1px;\n width: 300px;\n height: 300px;\n padding: 20px;\n border-radius: 20px;\n}\n.cardTitle {\n display: flex;\n justify-content: space-between;\n}\n.iconButtonBox {\n display: flex;\n align-items: center;\n}\n.drawerCard {\n position: relative;\n padding: 20px 80px 0;\n min-height: 100%;\n width: 60vw;\n min-width: 350px;\n}\n.p {\n display: -webkit-box;\n -webkit-line-clamp: 4;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n font-size: 14px;\n padding: 0px 10px;\n}\n.pasteText {\n font-size: 18px !important;\n color: #1976d2;\n cursor: pointer;\n margin-inline: 10px;\n}\n.pasteText:hover {\n color: #1976d2b3;\n}\n.copyToCommandLine {\n font-size: 16px !important;\n color: #1976d2;\n cursor: pointer;\n}\n.copyToCommandLine:hover {\n color: #1976d2b3;\n}\n.formContainer {\n height: 80%;\n overflow: scroll;\n padding: 0 10px;\n padding-bottom: 160px;\n}\n.buttonsContainer {\n position: absolute;\n bottom: 50px;\n left: 100px;\n right: 100px;\n}\n.buttons {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n}\n.css-1be5mm1-MuiLinearProgress-root-MuiMobileStepper-progress {\n width: 100% !important;\n}\n.css-r5rjnf-MuiLinearProgress-root-MuiMobileStepper-progress {\n width: 100% !important;\n}\n.instructionText {\n font-size: 12px;\n color: #666666;\n font-style: italic;\n margin: 30px 0;\n text-align: center;\n}\n.iconRow {\n position: absolute;\n bottom: 20px;\n left: 20px;\n right: 20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.iconItem {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 20px;\n}\n.boldIconText {\n font-weight: bold;\n font-size: 1.2em;\n}\n.muiIcon {\n font-size: 1.5em;\n}\n.smallText {\n font-size: 0.8em;\n}\n.dialogBox {\n width: 1241px;\n height: 607px;\n margin: 32px;\n overflow-x: scroll;\n}\n.dialogTitle {\n display: flex;\n justify-content: space-between;\n padding: 20px 20px 7px;\n}\n.dialogTitle-model_name {\n font-size: 18px;\n font-weight: 700;\n}\n.pathBox {\n width: 160px;\n cursor: pointer;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.pathBox2 {\n width: 300px;\n}\n.empty {\n position: absolute;\n left: 50%;\n top: 30%;\n font-size: 20px;\n color: #555;\n transform: translate(-50%, 0);\n}\n.deleteDialog {\n display: flex;\n align-items: center;\n}\n.warningIcon {\n margin-right: 10px;\n color: rgb(237, 108, 2);\n}\n.jsonDialog {\n display: flex;\n flex-direction: column;\n padding: 10px 30px;\n color: #000;\n border-radius: 8px;\n}\n.jsonDialog-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 10px 0 20px 0;\n}\n.title-name {\n font-size: 16px;\n font-weight: 700;\n}\n.main-box {\n width: 700px;\n height: 500px;\n}\n.but-box {\n display: flex;\n justify-content: end;\n margin-top: 20px;\n}\n.drawer {\n z-index: 1000;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0.3s ease, opacity 0.3s ease;\n}\n.drawer.open {\n visibility: visible;\n opacity: 1;\n}\n.drawer-overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 999;\n}\n.drawer-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: white;\n z-index: 1000;\n box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);\n transition: transform 0.3s ease;\n transform: translateX(100%);\n overflow-y: auto;\n}\n.drawer.open .drawer-content {\n transform: translateX(0);\n}\n.textHighlight .MuiSelect-select {\n color: #1976d2;\n}\n.textHighlight .MuiInputBase-input {\n color: #1976d2;\n}\n",".copyText {\n font-size: 14px !important;\n color: #666;\n cursor: pointer;\n}\n\n.copyText:hover {\n color: #1976d2;\n}\n",".formBox {\n position: relative;\n max-width: 50vw;\n min-width: 50vw;\n max-height: 80vh;\n overflow: auto;\n padding: 40px 20px 0 0;\n transition: all 0.4s ease-in-out;\n}\n\n.broaden {\n max-width: 100%;\n min-width: 100%;\n padding-right: 0;\n}\n\n.show-json {\n display: flex;\n align-items: center;\n position: absolute;\n top: 90px;\n right: 60px;\n}\n\n.icon {\n position: absolute;\n right: -40px;\n cursor: pointer;\n margin-left: 20px;\n}\n\n.icon:hover {\n color: #1976d2;\n}\n\n.arrow {\n font-size: 24px !important;\n}\n\n.jsonBox {\n position: relative;\n min-height: 80vh;\n width: 100%;\n transition: all 0.4s ease-in-out;\n}\n\n.hide {\n width: 0;\n transform: translate(30vw, 0);\n overflow: hidden;\n}\n\n.checkboxWrapper {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n}\n\n.jsonBox-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.jsonBox-title {\n line-height: 40px;\n font-weight: 700;\n}\n\n.textarea {\n width: 100%;\n height: calc(100% - 40px);\n padding: 5px 10px;\n border: 1px solid #ddd;\n border-radius: 5px;\n resize: none;\n color: #666;\n background-color: transparent;\n}\n\n.addBtn {\n margin-left: 20px !important;\n}\n\n.item {\n position: relative;\n border: 1px solid #ddd;\n margin: 10px 50px 0;\n padding: 20px;\n border-radius: 10px;\n overflow: hidden;\n}\n\n.item:hover .deleteBtn {\n transform: translateX(-50px);\n}\n\n.deleteBtn {\n position: absolute;\n right: 20px;\n top: calc(50% - 25px);\n width: 50px;\n height: 50px;\n transform: translateX(80px);\n text-align: center;\n line-height: 70px;\n border-radius: 25px;\n background-color: #1976d2;\n transition: all 0.3s ease-in-out;\n}\n\n.deleteBtn:hover {\n cursor: pointer;\n box-shadow: 0 0 10px #aaa;\n}\n\n.deleteIcon {\n font-size: 28px !important;\n color: #fff;\n}\n\n.chat_template_box {\n display: flex;\n align-items: start;\n gap: 10px;\n}\n\n.chat_template_test {\n width: 30%;\n}\n\n.chat_template_test_mainBox {\n height: 137px;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: 4px;\n overflow: scroll;\n}\n\n.chat_template_test_tip {\n font-size: 10px;\n margin: 4px 14px 0;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.test_res_box {\n border: 1px solid #ddd;\n min-height: 55px;\n padding: 10px;\n margin-top: 5px;\n border-radius: 4px;\n}\n\n.css-19qh8xo-MuiInputBase-input-MuiOutlinedInput-input.Mui-disabled {\n -webkit-text-fill-color: #000 !important;\n}\n"],"names":[],"sourceRoot":""}
|