Any-to-Any
Transformers
ONNX
Safetensors
English
Chinese
multimodal
audio
video
speech
streaming
full-duplex
long-video
custom-code
Instructions to use inclusionAI/Realtime-Venus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inclusionAI/Realtime-Venus with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("inclusionAI/Realtime-Venus", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Codex commited on
Commit ·
2da815c
1
Parent(s): 4ef2e83
Fix root config cache fallback and proxy forwarding
Browse files
Realtime-Venus-Audio/configuration_minicpmo.py
CHANGED
|
@@ -311,13 +311,16 @@ def _expand_venus_config(config, model_path, options, expected_model):
|
|
| 311 |
|
| 312 |
if raw is None:
|
| 313 |
from huggingface_hub import hf_hub_download, try_to_load_from_cache
|
|
|
|
|
|
|
| 314 |
cached = try_to_load_from_cache(ref['repo_id'],ref['filename'],
|
| 315 |
-
revision=ref['revision'],repo_type='model',cache_dir=
|
| 316 |
if isinstance(cached,str):
|
| 317 |
raw = Path(cached).read_bytes()
|
| 318 |
else:
|
| 319 |
download_options = {k: options[k] for k in
|
| 320 |
-
('
|
|
|
|
| 321 |
try:
|
| 322 |
resolved = hf_hub_download(repo_id=ref['repo_id'],repo_type='model',
|
| 323 |
filename=ref['filename'],revision=ref['revision'],**download_options)
|
|
|
|
| 311 |
|
| 312 |
if raw is None:
|
| 313 |
from huggingface_hub import hf_hub_download, try_to_load_from_cache
|
| 314 |
+
from transformers.utils.hub import TRANSFORMERS_CACHE
|
| 315 |
+
cache_dir = options.get('cache_dir') or TRANSFORMERS_CACHE
|
| 316 |
cached = try_to_load_from_cache(ref['repo_id'],ref['filename'],
|
| 317 |
+
revision=ref['revision'],repo_type='model',cache_dir=cache_dir)
|
| 318 |
if isinstance(cached,str):
|
| 319 |
raw = Path(cached).read_bytes()
|
| 320 |
else:
|
| 321 |
download_options = {k: options[k] for k in
|
| 322 |
+
('token','local_files_only','force_download','user_agent','proxies') if k in options}
|
| 323 |
+
download_options['cache_dir'] = cache_dir
|
| 324 |
try:
|
| 325 |
resolved = hf_hub_download(repo_id=ref['repo_id'],repo_type='model',
|
| 326 |
filename=ref['filename'],revision=ref['revision'],**download_options)
|
Realtime-Venus-Omni/configuration_realtime_venus_omni.py
CHANGED
|
@@ -311,13 +311,16 @@ def _expand_venus_config(config, model_path, options, expected_model):
|
|
| 311 |
|
| 312 |
if raw is None:
|
| 313 |
from huggingface_hub import hf_hub_download, try_to_load_from_cache
|
|
|
|
|
|
|
| 314 |
cached = try_to_load_from_cache(ref['repo_id'],ref['filename'],
|
| 315 |
-
revision=ref['revision'],repo_type='model',cache_dir=
|
| 316 |
if isinstance(cached,str):
|
| 317 |
raw = Path(cached).read_bytes()
|
| 318 |
else:
|
| 319 |
download_options = {k: options[k] for k in
|
| 320 |
-
('
|
|
|
|
| 321 |
try:
|
| 322 |
resolved = hf_hub_download(repo_id=ref['repo_id'],repo_type='model',
|
| 323 |
filename=ref['filename'],revision=ref['revision'],**download_options)
|
|
|
|
| 311 |
|
| 312 |
if raw is None:
|
| 313 |
from huggingface_hub import hf_hub_download, try_to_load_from_cache
|
| 314 |
+
from transformers.utils.hub import TRANSFORMERS_CACHE
|
| 315 |
+
cache_dir = options.get('cache_dir') or TRANSFORMERS_CACHE
|
| 316 |
cached = try_to_load_from_cache(ref['repo_id'],ref['filename'],
|
| 317 |
+
revision=ref['revision'],repo_type='model',cache_dir=cache_dir)
|
| 318 |
if isinstance(cached,str):
|
| 319 |
raw = Path(cached).read_bytes()
|
| 320 |
else:
|
| 321 |
download_options = {k: options[k] for k in
|
| 322 |
+
('token','local_files_only','force_download','user_agent','proxies') if k in options}
|
| 323 |
+
download_options['cache_dir'] = cache_dir
|
| 324 |
try:
|
| 325 |
resolved = hf_hub_download(repo_id=ref['repo_id'],repo_type='model',
|
| 326 |
filename=ref['filename'],revision=ref['revision'],**download_options)
|