Video-Text-to-Text
Transformers
Safetensors
English
Chinese
wemm_qwen3_5_moe
feature-extraction
wemm
multimodal
video
audio
quantized
fp8
Mixture of Experts
custom_code
Instructions to use tencent/WeMM-Video-35BA3B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/WeMM-Video-35BA3B-FP8 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tencent/WeMM-Video-35BA3B-FP8", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download wemm_zip_policy.py from tencent/WeMM-Video-35BA3B-FP8: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/tencent/WeMM-Video-35BA3B-FP8/resolve/main/wemm_zip_policy.py
- Command line
-
hf download hf://tencent/WeMM-Video-35BA3B-FP8/wemm_zip_policy.py
-
curl -L -o wemm_zip_policy.py https://huggingface.co/tencent/WeMM-Video-35BA3B-FP8/resolve/main/wemm_zip_policy.py
1.63 kB
| """Frame-count policy for pre-sampled WeMM ZIP videos.""" | |
| import math | |
| def positive_frame_count(value, name="num_frames"): | |
| if value is None: | |
| return None | |
| if isinstance(value, bool): | |
| raise ValueError(f"{name} must be a positive integer") | |
| try: | |
| number = float(value) | |
| except (TypeError, ValueError, OverflowError) as exc: | |
| raise ValueError(f"{name} must be a positive integer") from exc | |
| if not math.isfinite(number) or number <= 0 or not number.is_integer(): | |
| raise ValueError(f"{name} must be a positive integer; omit it for the bounded ZIP default") | |
| return int(number) | |
| def zip_frame_indices(total, num_frames=None, **options): | |
| """Keep all frames up to the limit; sample the whole timeline above it.""" | |
| total = positive_frame_count(total, "ZIP image count") | |
| limits = [positive_frame_count(options.get("max_frames", 128), "max_frames")] | |
| for key in ("max_allowed_frames", "wemm_zip_max_frames"): | |
| if options.get(key) is not None: | |
| limits.append(positive_frame_count(options[key], key)) | |
| limit = min(limits) | |
| count = positive_frame_count(num_frames) | |
| if count is None: | |
| count = min(total, limit) | |
| elif count > limit: | |
| raise ValueError(f"Requested ZIP num_frames={count} exceeds frame limit {limit}") | |
| elif count > total: | |
| raise ValueError(f"Requested ZIP num_frames={count} exceeds available frames {total}") | |
| if count == 1: | |
| return [0] | |
| # Integer form of truncated linspace; include both ends of the archive. | |
| return [index * (total - 1) // (count - 1) for index in range(count)] | |