Video-Text-to-Text
Transformers
Safetensors
English
Chinese
moss_vl
feature-extraction
Realtime
Streaming
Video-Understanding
Image-Understanding
MOSS-VL
OpenMOSS
multimodal
video
vision-language
custom_code
Instructions to use OpenMOSS-Team/MOSS-VL-Realtime with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/MOSS-VL-Realtime with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenMOSS-Team/MOSS-VL-Realtime", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix: yield GIL in realtime idle wait — busy-wait starves co-resident threads
#2
by Joiin0392 - opened
- modeling_moss_vl.py +5 -2
modeling_moss_vl.py
CHANGED
|
@@ -3099,8 +3099,11 @@ class MossVLForConditionalGeneration(MossVLPreTrainedModel, GenerationMixin):
|
|
| 3099 |
break
|
| 3100 |
|
| 3101 |
if self.continue_generating and should_wait_for_new_input and not frames_to_process and not prompts_to_process:
|
| 3102 |
-
#
|
| 3103 |
-
#
|
|
|
|
|
|
|
|
|
|
| 3104 |
continue
|
| 3105 |
break
|
| 3106 |
|
|
|
|
| 3099 |
break
|
| 3100 |
|
| 3101 |
if self.continue_generating and should_wait_for_new_input and not frames_to_process and not prompts_to_process:
|
| 3102 |
+
# GIL-friendly wait: a bare `continue` busy-spin monopolizes the GIL
|
| 3103 |
+
# and starves in-process siblings (in-process ASR decode inflates
|
| 3104 |
+
# ~150ms -> 40-80s while a realtime session idles in <|silence|>).
|
| 3105 |
+
# 20ms poll keeps input-detection latency negligible.
|
| 3106 |
+
time.sleep(0.02)
|
| 3107 |
continue
|
| 3108 |
break
|
| 3109 |
|