Upload folder using huggingface_hub
Browse files- .gitattributes +8 -0
- README.md +354 -3
- assets/comp_effic.png +3 -0
- assets/logo.png +0 -0
- assets/moe_2.png +3 -0
- assets/moe_arch.png +0 -0
- assets/performance.png +3 -0
- assets/vae.png +3 -0
- config.json +43 -42
- wav2vec2-large-xlsr-53-english/.msc +0 -0
- wav2vec2-large-xlsr-53-english/.mv +1 -0
- wav2vec2-large-xlsr-53-english/README.md +165 -0
- wav2vec2-large-xlsr-53-english/alphabet.json +1 -0
- wav2vec2-large-xlsr-53-english/config.json +75 -0
- wav2vec2-large-xlsr-53-english/configuration.json +1 -0
- wav2vec2-large-xlsr-53-english/eval.py +164 -0
- wav2vec2-large-xlsr-53-english/flax_model.msgpack +3 -0
- wav2vec2-large-xlsr-53-english/full_eval.sh +15 -0
- wav2vec2-large-xlsr-53-english/language_model/attrs.json +1 -0
- wav2vec2-large-xlsr-53-english/language_model/lm.binary +3 -0
- wav2vec2-large-xlsr-53-english/language_model/unigrams.txt +0 -0
- wav2vec2-large-xlsr-53-english/log_mozilla-foundation_common_voice_6_0_en_test_predictions.txt +0 -0
- wav2vec2-large-xlsr-53-english/log_mozilla-foundation_common_voice_6_0_en_test_predictions_greedy.txt +0 -0
- wav2vec2-large-xlsr-53-english/log_mozilla-foundation_common_voice_6_0_en_test_targets.txt +0 -0
- wav2vec2-large-xlsr-53-english/log_speech-recognition-community-v2_dev_data_en_validation_predictions.txt +0 -0
- wav2vec2-large-xlsr-53-english/log_speech-recognition-community-v2_dev_data_en_validation_predictions_greedy.txt +0 -0
- wav2vec2-large-xlsr-53-english/log_speech-recognition-community-v2_dev_data_en_validation_targets.txt +0 -0
- wav2vec2-large-xlsr-53-english/model.safetensors +3 -0
- wav2vec2-large-xlsr-53-english/mozilla-foundation_common_voice_6_0_en_test_eval_results.txt +2 -0
- wav2vec2-large-xlsr-53-english/mozilla-foundation_common_voice_6_0_en_test_eval_results_greedy.txt +2 -0
- wav2vec2-large-xlsr-53-english/preprocessor_config.json +10 -0
- wav2vec2-large-xlsr-53-english/pytorch_model.bin +3 -0
- wav2vec2-large-xlsr-53-english/special_tokens_map.json +1 -0
- wav2vec2-large-xlsr-53-english/speech-recognition-community-v2_dev_data_en_validation_eval_results.txt +2 -0
- wav2vec2-large-xlsr-53-english/speech-recognition-community-v2_dev_data_en_validation_eval_results_greedy.txt +2 -0
- wav2vec2-large-xlsr-53-english/vocab.json +1 -0
.gitattributes
CHANGED
@@ -7,3 +7,11 @@ diffusion_pytorch_model-00004-of-00004.safetensors filter=lfs diff=lfs merge=lfs
|
|
7 |
google/umt5-xxl/spiece.model filter=lfs diff=lfs merge=lfs -text
|
8 |
google/umt5-xxl/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
9 |
models_t5_umt5-xxl-enc-bf16.pth filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
google/umt5-xxl/spiece.model filter=lfs diff=lfs merge=lfs -text
|
8 |
google/umt5-xxl/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
9 |
models_t5_umt5-xxl-enc-bf16.pth filter=lfs diff=lfs merge=lfs -text
|
10 |
+
assets/comp_effic.png filter=lfs diff=lfs merge=lfs -text
|
11 |
+
assets/moe_2.png filter=lfs diff=lfs merge=lfs -text
|
12 |
+
assets/performance.png filter=lfs diff=lfs merge=lfs -text
|
13 |
+
assets/vae.png filter=lfs diff=lfs merge=lfs -text
|
14 |
+
wav2vec2-large-xlsr-53-english/flax_model.msgpack filter=lfs diff=lfs merge=lfs -text
|
15 |
+
wav2vec2-large-xlsr-53-english/language_model/lm.binary filter=lfs diff=lfs merge=lfs -text
|
16 |
+
wav2vec2-large-xlsr-53-english/model.safetensors filter=lfs diff=lfs merge=lfs -text
|
17 |
+
wav2vec2-large-xlsr-53-english/pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,3 +1,354 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Wan2.2
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<img src="assets/logo.png" width="400"/>
|
5 |
+
<p>
|
6 |
+
|
7 |
+
<p align="center">
|
8 |
+
💜 <a href="https://wan.video"><b>Wan</b></a>    |    🖥️ <a href="https://github.com/Wan-Video/Wan2.2">GitHub</a>    |   🤗 <a href="https://huggingface.co/Wan-AI/">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/organization/Wan-AI">ModelScope</a>   |    📑 <a href="https://arxiv.org/abs/2503.20314">Paper</a>    |    📑 <a href="https://wan.video/welcome?spm=a2ty_o02.30011076.0.0.6c9ee41eCcluqg">Blog</a>    |    💬 <a href="https://discord.gg/AKNgpMK4Yj">Discord</a>  
|
9 |
+
<br>
|
10 |
+
📕 <a href="https://alidocs.dingtalk.com/i/nodes/jb9Y4gmKWrx9eo4dCql9LlbYJGXn6lpz">使用指南(中文)</a>   |    📘 <a href="https://alidocs.dingtalk.com/i/nodes/EpGBa2Lm8aZxe5myC99MelA2WgN7R35y">User Guide(English)</a>   |   💬 <a href="https://gw.alicdn.com/imgextra/i2/O1CN01tqjWFi1ByuyehkTSB_!!6000000000015-0-tps-611-1279.jpg">WeChat(微信)</a>  
|
11 |
+
<br>
|
12 |
+
|
13 |
+
-----
|
14 |
+
|
15 |
+
[**Wan: Open and Advanced Large-Scale Video Generative Models**](https://arxiv.org/abs/2503.20314) <be>
|
16 |
+
|
17 |
+
|
18 |
+
We are excited to introduce **Wan2.2**, a major upgrade to our foundational video models. With **Wan2.2**, we have focused on incorporating the following innovations:
|
19 |
+
|
20 |
+
- 👍 **Effective MoE Architecture**: Wan2.2 introduces a Mixture-of-Experts (MoE) architecture into video diffusion models. By separating the denoising process cross timesteps with specialized powerful expert models, this enlarges the overall model capacity while maintaining the same computational cost.
|
21 |
+
|
22 |
+
- 👍 **Cinematic-level Aesthetics**: Wan2.2 incorporates meticulously curated aesthetic data, complete with detailed labels for lighting, composition, contrast, color tone, and more. This allows for more precise and controllable cinematic style generation, facilitating the creation of videos with customizable aesthetic preferences.
|
23 |
+
|
24 |
+
- 👍 **Complex Motion Generation**: Compared to Wan2.1, Wan2.2 is trained on a significantly larger data, with +65.6% more images and +83.2% more videos. This expansion notably enhances the model's generalization across multiple dimensions such as motions, semantics, and aesthetics, achieving TOP performance among all open-sourced and closed-sourced models.
|
25 |
+
|
26 |
+
- 👍 **Efficient High-Definition Hybrid TI2V**: Wan2.2 open-sources a 5B model built with our advanced Wan2.2-VAE that achieves a compression ratio of **16×16×4**. This model supports both text-to-video and image-to-video generation at 720P resolution with 24fps and can also run on consumer-grade graphics cards like 4090. It is one of the fastest **720P@24fps** models currently available, capable of serving both the industrial and academic sectors simultaneously.
|
27 |
+
|
28 |
+
|
29 |
+
## Video Demos
|
30 |
+
|
31 |
+
<div align="center">
|
32 |
+
<video src="https://github.com/user-attachments/assets/b63bfa58-d5d7-4de6-a1a2-98970b06d9a7" width="70%" poster=""> </video>
|
33 |
+
</div>
|
34 |
+
|
35 |
+
## 🔥 Latest News!!
|
36 |
+
|
37 |
+
* Aug 26, 2025: 🎵 We introduce **Wan2.2-S2V-14B**, an audio-driven cinematic video generation model, including [inference code](#run-speech-to-video-generation), [model weights](#model-download), and blog! Try our [ModelScope Gradio](https://www.modelscope.cn/studios/Wan-AI/Wan2.2-S2V) and [HuggingFace Gradio](https://huggingface.co/spaces/Wan-AI/Wan2.2-S2V) demos!
|
38 |
+
* Jul 28, 2025: 👋 We have open a [HF space](https://huggingface.co/spaces/Wan-AI/Wan-2.2-5B) using the TI2V-5B model. Enjoy!
|
39 |
+
* Jul 28, 2025: 👋 Wan2.2 has been integrated into ComfyUI ([CN](https://docs.comfy.org/zh-CN/tutorials/video/wan/wan2_2) | [EN](https://docs.comfy.org/tutorials/video/wan/wan2_2)). Enjoy!
|
40 |
+
* Jul 28, 2025: 👋 Wan2.2's T2V, I2V and TI2V have been integrated into Diffusers ([T2V-A14B](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers) | [I2V-A14B](https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers) | [TI2V-5B](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers)). Feel free to give it a try!
|
41 |
+
* Jul 28, 2025: 👋 We've released the inference code and model weights of **Wan2.2**.
|
42 |
+
|
43 |
+
|
44 |
+
## Community Works
|
45 |
+
If your research or project builds upon [**Wan2.1**](https://github.com/Wan-Video/Wan2.1) or [**Wan2.2**](https://github.com/Wan-Video/Wan2.2), and you would like more people to see it, please inform us.
|
46 |
+
|
47 |
+
- [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio) provides comprehensive support for Wan 2.2, including low-GPU-memory layer-by-layer offload, FP8 quantization, sequence parallelism, LoRA training, full training.
|
48 |
+
- [Kijai's ComfyUI WanVideoWrapper](https://github.com/kijai/ComfyUI-WanVideoWrapper) is an alternative implementation of Wan models for ComfyUI. Thanks to its Wan-only focus, it's on the frontline of getting cutting edge optimizations and hot research features, which are often hard to integrate into ComfyUI quickly due to its more rigid structure.
|
49 |
+
|
50 |
+
|
51 |
+
## 📑 Todo List
|
52 |
+
- Wan2.2 Text-to-Video
|
53 |
+
- [x] Multi-GPU Inference code of the A14B and 14B models
|
54 |
+
- [x] Checkpoints of the A14B and 14B models
|
55 |
+
- [x] ComfyUI integration
|
56 |
+
- [x] Diffusers integration
|
57 |
+
- Wan2.2 Image-to-Video
|
58 |
+
- [x] Multi-GPU Inference code of the A14B model
|
59 |
+
- [x] Checkpoints of the A14B model
|
60 |
+
- [x] ComfyUI integration
|
61 |
+
- [x] Diffusers integration
|
62 |
+
- Wan2.2 Text-Image-to-Video
|
63 |
+
- [x] Multi-GPU Inference code of the 5B model
|
64 |
+
- [x] Checkpoints of the 5B model
|
65 |
+
- [x] ComfyUI integration
|
66 |
+
- [x] Diffusers integration
|
67 |
+
- Wan2.2-S2V Speech-to-Video
|
68 |
+
- [x] Inference code of Wan2.2-S2V
|
69 |
+
- [x] Checkpoints of Wan2.2-S2V-14B
|
70 |
+
- [ ] ComfyUI integration
|
71 |
+
- [ ] Diffusers integration
|
72 |
+
|
73 |
+
## Run Wan2.2
|
74 |
+
|
75 |
+
#### Installation
|
76 |
+
Clone the repo:
|
77 |
+
```sh
|
78 |
+
git clone https://github.com/Wan-Video/Wan2.2.git
|
79 |
+
cd Wan2.2
|
80 |
+
```
|
81 |
+
|
82 |
+
Install dependencies:
|
83 |
+
```sh
|
84 |
+
# Ensure torch >= 2.4.0
|
85 |
+
# If the installation of `flash_attn` fails, try installing the other packages first and install `flash_attn` last
|
86 |
+
pip install -r requirements.txt
|
87 |
+
```
|
88 |
+
|
89 |
+
|
90 |
+
#### Model Download
|
91 |
+
|
92 |
+
| Models | Download Links | Description |
|
93 |
+
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------|-------------|
|
94 |
+
| T2V-A14B | 🤗 [Huggingface](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B) 🤖 [ModelScope](https://modelscope.cn/models/Wan-AI/Wan2.2-T2V-A14B) | Text-to-Video MoE model, supports 480P & 720P |
|
95 |
+
| I2V-A14B | 🤗 [Huggingface](https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B) 🤖 [ModelScope](https://modelscope.cn/models/Wan-AI/Wan2.2-I2V-A14B) | Image-to-Video MoE model, supports 480P & 720P |
|
96 |
+
| TI2V-5B | 🤗 [Huggingface](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B) 🤖 [ModelScope](https://modelscope.cn/models/Wan-AI/Wan2.2-TI2V-5B) | High-compression VAE, T2V+I2V, supports 720P |
|
97 |
+
| S2V-14B | 🤗 [Huggingface](https://huggingface.co/Wan-AI/Wan2.2-S2V-14B) 🤖 [ModelScope](https://modelscope.cn/models/Wan-AI/Wan2.2-S2V-14B) | Speech-to-Video model, supports 480P & 720P |
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
> 💡Note:
|
102 |
+
> The TI2V-5B model supports 720P video generation at **24 FPS**.
|
103 |
+
|
104 |
+
|
105 |
+
Download models using huggingface-cli:
|
106 |
+
``` sh
|
107 |
+
pip install "huggingface_hub[cli]"
|
108 |
+
huggingface-cli download Wan-AI/Wan2.2-T2V-A14B --local-dir ./Wan2.2-T2V-A14B
|
109 |
+
```
|
110 |
+
|
111 |
+
Download models using modelscope-cli:
|
112 |
+
``` sh
|
113 |
+
pip install modelscope
|
114 |
+
modelscope download Wan-AI/Wan2.2-T2V-A14B --local_dir ./Wan2.2-T2V-A14B
|
115 |
+
```
|
116 |
+
|
117 |
+
#### Run Text-to-Video Generation
|
118 |
+
|
119 |
+
This repository supports the `Wan2.2-T2V-A14B` Text-to-Video model and can simultaneously support video generation at 480P and 720P resolutions.
|
120 |
+
|
121 |
+
|
122 |
+
##### (1) Without Prompt Extension
|
123 |
+
|
124 |
+
To facilitate implementation, we will start with a basic version of the inference process that skips the [prompt extension](#2-using-prompt-extention) step.
|
125 |
+
|
126 |
+
- Single-GPU inference
|
127 |
+
|
128 |
+
``` sh
|
129 |
+
python generate.py --task t2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-T2V-A14B --offload_model True --convert_model_dtype --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
|
130 |
+
```
|
131 |
+
|
132 |
+
> 💡 This command can run on a GPU with at least 80GB VRAM.
|
133 |
+
|
134 |
+
> 💡If you encounter OOM (Out-of-Memory) issues, you can use the `--offload_model True`, `--convert_model_dtype` and `--t5_cpu` options to reduce GPU memory usage.
|
135 |
+
|
136 |
+
|
137 |
+
- Multi-GPU inference using FSDP + DeepSpeed Ulysses
|
138 |
+
|
139 |
+
We use [PyTorch FSDP](https://docs.pytorch.org/docs/stable/fsdp.html) and [DeepSpeed Ulysses](https://arxiv.org/abs/2309.14509) to accelerate inference.
|
140 |
+
|
141 |
+
|
142 |
+
``` sh
|
143 |
+
torchrun --nproc_per_node=8 generate.py --task t2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-T2V-A14B --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
|
144 |
+
```
|
145 |
+
|
146 |
+
|
147 |
+
##### (2) Using Prompt Extension
|
148 |
+
|
149 |
+
Extending the prompts can effectively enrich the details in the generated videos, further enhancing the video quality. Therefore, we recommend enabling prompt extension. We provide the following two methods for prompt extension:
|
150 |
+
|
151 |
+
- Use the Dashscope API for extension.
|
152 |
+
- Apply for a `dashscope.api_key` in advance ([EN](https://www.alibabacloud.com/help/en/model-studio/getting-started/first-api-call-to-qwen) | [CN](https://help.aliyun.com/zh/model-studio/getting-started/first-api-call-to-qwen)).
|
153 |
+
- Configure the environment variable `DASH_API_KEY` to specify the Dashscope API key. For users of Alibaba Cloud's international site, you also need to set the environment variable `DASH_API_URL` to 'https://dashscope-intl.aliyuncs.com/api/v1'. For more detailed instructions, please refer to the [dashscope document](https://www.alibabacloud.com/help/en/model-studio/developer-reference/use-qwen-by-calling-api?spm=a2c63.p38356.0.i1).
|
154 |
+
- Use the `qwen-plus` model for text-to-video tasks and `qwen-vl-max` for image-to-video tasks.
|
155 |
+
- You can modify the model used for extension with the parameter `--prompt_extend_model`. For example:
|
156 |
+
```sh
|
157 |
+
DASH_API_KEY=your_key torchrun --nproc_per_node=8 generate.py --task t2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-T2V-A14B --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage" --use_prompt_extend --prompt_extend_method 'dashscope' --prompt_extend_target_lang 'zh'
|
158 |
+
```
|
159 |
+
|
160 |
+
- Using a local model for extension.
|
161 |
+
|
162 |
+
- By default, the Qwen model on HuggingFace is used for this extension. Users can choose Qwen models or other models based on the available GPU memory size.
|
163 |
+
- For text-to-video tasks, you can use models like `Qwen/Qwen2.5-14B-Instruct`, `Qwen/Qwen2.5-7B-Instruct` and `Qwen/Qwen2.5-3B-Instruct`.
|
164 |
+
- For image-to-video tasks, you can use models like `Qwen/Qwen2.5-VL-7B-Instruct` and `Qwen/Qwen2.5-VL-3B-Instruct`.
|
165 |
+
- Larger models generally provide better extension results but require more GPU memory.
|
166 |
+
- You can modify the model used for extension with the parameter `--prompt_extend_model` , allowing you to specify either a local model path or a Hugging Face model. For example:
|
167 |
+
|
168 |
+
``` sh
|
169 |
+
torchrun --nproc_per_node=8 generate.py --task t2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-T2V-A14B --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage" --use_prompt_extend --prompt_extend_method 'local_qwen' --prompt_extend_target_lang 'zh'
|
170 |
+
```
|
171 |
+
|
172 |
+
|
173 |
+
#### Run Image-to-Video Generation
|
174 |
+
|
175 |
+
This repository supports the `Wan2.2-I2V-A14B` Image-to-Video model and can simultaneously support video generation at 480P and 720P resolutions.
|
176 |
+
|
177 |
+
|
178 |
+
- Single-GPU inference
|
179 |
+
```sh
|
180 |
+
python generate.py --task i2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-I2V-A14B --offload_model True --convert_model_dtype --image examples/i2v_input.JPG --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
181 |
+
```
|
182 |
+
|
183 |
+
> This command can run on a GPU with at least 80GB VRAM.
|
184 |
+
|
185 |
+
> 💡For the Image-to-Video task, the `size` parameter represents the area of the generated video, with the aspect ratio following that of the original input image.
|
186 |
+
|
187 |
+
|
188 |
+
- Multi-GPU inference using FSDP + DeepSpeed Ulysses
|
189 |
+
|
190 |
+
```sh
|
191 |
+
torchrun --nproc_per_node=8 generate.py --task i2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-I2V-A14B --image examples/i2v_input.JPG --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
192 |
+
```
|
193 |
+
|
194 |
+
- Image-to-Video Generation without prompt
|
195 |
+
|
196 |
+
```sh
|
197 |
+
DASH_API_KEY=your_key torchrun --nproc_per_node=8 generate.py --task i2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-I2V-A14B --prompt '' --image examples/i2v_input.JPG --dit_fsdp --t5_fsdp --ulysses_size 8 --use_prompt_extend --prompt_extend_method 'dashscope'
|
198 |
+
```
|
199 |
+
|
200 |
+
> 💡The model can generate videos solely from the input image. You can use prompt extension to generate prompt from the image.
|
201 |
+
|
202 |
+
> The process of prompt extension can be referenced [here](#2-using-prompt-extention).
|
203 |
+
|
204 |
+
#### Run Text-Image-to-Video Generation
|
205 |
+
|
206 |
+
This repository supports the `Wan2.2-TI2V-5B` Text-Image-to-Video model and can support video generation at 720P resolutions.
|
207 |
+
|
208 |
+
|
209 |
+
- Single-GPU Text-to-Video inference
|
210 |
+
```sh
|
211 |
+
python generate.py --task ti2v-5B --size 1280*704 --ckpt_dir ./Wan2.2-TI2V-5B --offload_model True --convert_model_dtype --t5_cpu --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage"
|
212 |
+
```
|
213 |
+
|
214 |
+
> 💡Unlike other tasks, the 720P resolution of the Text-Image-to-Video task is `1280*704` or `704*1280`.
|
215 |
+
|
216 |
+
> This command can run on a GPU with at least 24GB VRAM (e.g, RTX 4090 GPU).
|
217 |
+
|
218 |
+
> 💡If you are running on a GPU with at least 80GB VRAM, you can remove the `--offload_model True`, `--convert_model_dtype` and `--t5_cpu` options to speed up execution.
|
219 |
+
|
220 |
+
|
221 |
+
- Single-GPU Image-to-Video inference
|
222 |
+
```sh
|
223 |
+
python generate.py --task ti2v-5B --size 1280*704 --ckpt_dir ./Wan2.2-TI2V-5B --offload_model True --convert_model_dtype --t5_cpu --image examples/i2v_input.JPG --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
224 |
+
```
|
225 |
+
|
226 |
+
> 💡If the image parameter is configured, it is an Image-to-Video generation; otherwise, it defaults to a Text-to-Video generation.
|
227 |
+
|
228 |
+
> 💡Similar to Image-to-Video, the `size` parameter represents the area of the generated video, with the aspect ratio following that of the original input image.
|
229 |
+
|
230 |
+
|
231 |
+
- Multi-GPU inference using FSDP + DeepSpeed Ulysses
|
232 |
+
|
233 |
+
```sh
|
234 |
+
torchrun --nproc_per_node=8 generate.py --task ti2v-5B --size 1280*704 --ckpt_dir ./Wan2.2-TI2V-5B --dit_fsdp --t5_fsdp --ulysses_size 8 --image examples/i2v_input.JPG --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
235 |
+
```
|
236 |
+
|
237 |
+
> The process of prompt extension can be referenced [here](#2-using-prompt-extention).
|
238 |
+
|
239 |
+
#### Run Speech-to-Video Generation
|
240 |
+
|
241 |
+
This repository supports the `Wan2.2-S2V-14B` Speech-to-Video model and can simultaneously support video generation at 480P and 720P resolutions.
|
242 |
+
|
243 |
+
- Single-GPU Speech-to-Video inference
|
244 |
+
|
245 |
+
```sh
|
246 |
+
python generate.py --task s2v-14B --size 1024*704 --ckpt_dir ./Wan2.2-S2V-14B/ --offload_model True --convert_model_dtype --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard." --image "examples/i2v_input.JPG" --audio "examples/talk.wav"
|
247 |
+
# Without setting --num_clip, the generated video length will automatically adjust based on the input audio length
|
248 |
+
```
|
249 |
+
|
250 |
+
> 💡 This command can run on a GPU with at least 80GB VRAM.
|
251 |
+
|
252 |
+
- Multi-GPU inference using FSDP + DeepSpeed Ulysses
|
253 |
+
|
254 |
+
```sh
|
255 |
+
torchrun --nproc_per_node=8 generate.py --task s2v-14B --size 1024*704 --ckpt_dir ./Wan2.2-S2V-14B/ --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard." --image "examples/i2v_input.JPG" --audio "examples/talk.wav"
|
256 |
+
```
|
257 |
+
|
258 |
+
- Pose + Audio driven generation
|
259 |
+
|
260 |
+
```sh
|
261 |
+
torchrun --nproc_per_node=8 generate.py --task s2v-14B --size 1024*704 --ckpt_dir ./Wan2.2-S2V-14B/ --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "a person is singing" --image "examples/pose.png" --audio "examples/sing.MP3" --pose_video "./examples/pose.mp4"
|
262 |
+
```
|
263 |
+
|
264 |
+
> 💡For the Speech-to-Video task, the `size` parameter represents the area of the generated video, with the aspect ratio following that of the original input image.
|
265 |
+
|
266 |
+
> 💡The model can generate videos from audio input combined with reference image and optional text prompt.
|
267 |
+
|
268 |
+
> 💡The `--pose_video` parameter enables pose-driven generation, allowing the model to follow specific pose sequences while generating videos synchronized with audio input.
|
269 |
+
|
270 |
+
> 💡The `--num_clip` parameter controls the number of video clips generated, useful for quick preview with shorter generation time.
|
271 |
+
|
272 |
+
## Computational Efficiency on Different GPUs
|
273 |
+
|
274 |
+
We test the computational efficiency of different **Wan2.2** models on different GPUs in the following table. The results are presented in the format: **Total time (s) / peak GPU memory (GB)**.
|
275 |
+
|
276 |
+
|
277 |
+
<div align="center">
|
278 |
+
<img src="assets/comp_effic.png" alt="" style="width: 80%;" />
|
279 |
+
</div>
|
280 |
+
|
281 |
+
> The parameter settings for the tests presented in this table are as follows:
|
282 |
+
> (1) Multi-GPU: 14B: `--ulysses_size 4/8 --dit_fsdp --t5_fsdp`, 5B: `--ulysses_size 4/8 --offload_model True --convert_model_dtype --t5_cpu`; Single-GPU: 14B: `--offload_model True --convert_model_dtype`, 5B: `--offload_model True --convert_model_dtype --t5_cpu`
|
283 |
+
(--convert_model_dtype converts model parameter types to config.param_dtype);
|
284 |
+
> (2) The distributed testing utilizes the built-in FSDP and Ulysses implementations, with FlashAttention3 deployed on Hopper architecture GPUs;
|
285 |
+
> (3) Tests were run without the `--use_prompt_extend` flag;
|
286 |
+
> (4) Reported results are the average of multiple samples taken after the warm-up phase.
|
287 |
+
|
288 |
+
|
289 |
+
-------
|
290 |
+
|
291 |
+
## Introduction of Wan2.2
|
292 |
+
|
293 |
+
**Wan2.2** builds on the foundation of Wan2.1 with notable improvements in generation quality and model capability. This upgrade is driven by a series of key technical innovations, mainly including the Mixture-of-Experts (MoE) architecture, upgraded training data, and high-compression video generation.
|
294 |
+
|
295 |
+
##### (1) Mixture-of-Experts (MoE) Architecture
|
296 |
+
|
297 |
+
Wan2.2 introduces Mixture-of-Experts (MoE) architecture into the video generation diffusion model. MoE has been widely validated in large language models as an efficient approach to increase total model parameters while keeping inference cost nearly unchanged. In Wan2.2, the A14B model series adopts a two-expert design tailored to the denoising process of diffusion models: a high-noise expert for the early stages, focusing on overall layout; and a low-noise expert for the later stages, refining video details. Each expert model has about 14B parameters, resulting in a total of 27B parameters but only 14B active parameters per step, keeping inference computation and GPU memory nearly unchanged.
|
298 |
+
|
299 |
+
<div align="center">
|
300 |
+
<img src="assets/moe_arch.png" alt="" style="width: 90%;" />
|
301 |
+
</div>
|
302 |
+
|
303 |
+
The transition point between the two experts is determined by the signal-to-noise ratio (SNR), a metric that decreases monotonically as the denoising step $t$ increases. At the beginning of the denoising process, $t$ is large and the noise level is high, so the SNR is at its minimum, denoted as ${SNR}_{min}$. In this stage, the high-noise expert is activated. We define a threshold step ${t}_{moe}$ corresponding to half of the ${SNR}_{min}$, and switch to the low-noise expert when $t<{t}_{moe}$.
|
304 |
+
|
305 |
+
<div align="center">
|
306 |
+
<img src="assets/moe_2.png" alt="" style="width: 90%;" />
|
307 |
+
</div>
|
308 |
+
|
309 |
+
To validate the effectiveness of the MoE architecture, four settings are compared based on their validation loss curves. The baseline **Wan2.1** model does not employ the MoE architecture. Among the MoE-based variants, the **Wan2.1 & High-Noise Expert** reuses the Wan2.1 model as the low-noise expert while uses the Wan2.2's high-noise expert, while the **Wan2.1 & Low-Noise Expert** uses Wan2.1 as the high-noise expert and employ the Wan2.2's low-noise expert. The **Wan2.2 (MoE)** (our final version) achieves the lowest validation loss, indicating that its generated video distribution is closest to ground-truth and exhibits superior convergence.
|
310 |
+
|
311 |
+
|
312 |
+
##### (2) Efficient High-Definition Hybrid TI2V
|
313 |
+
To enable more efficient deployment, Wan2.2 also explores a high-compression design. In addition to the 27B MoE models, a 5B dense model, i.e., TI2V-5B, is released. It is supported by a high-compression Wan2.2-VAE, which achieves a $T\times H\times W$ compression ratio of $4\times16\times16$, increasing the overall compression rate to 64 while maintaining high-quality video reconstruction. With an additional patchification layer, the total compression ratio of TI2V-5B reaches $4\times32\times32$. Without specific optimization, TI2V-5B can generate a 5-second 720P video in under 9 minutes on a single consumer-grade GPU, ranking among the fastest 720P@24fps video generation models. This model also natively supports both text-to-video and image-to-video tasks within a single unified framework, covering both academic research and practical applications.
|
314 |
+
|
315 |
+
|
316 |
+
<div align="center">
|
317 |
+
<img src="assets/vae.png" alt="" style="width: 80%;" />
|
318 |
+
</div>
|
319 |
+
|
320 |
+
|
321 |
+
|
322 |
+
##### Comparisons to SOTAs
|
323 |
+
We compared Wan2.2 with leading closed-source commercial models on our new Wan-Bench 2.0, evaluating performance across multiple crucial dimensions. The results demonstrate that Wan2.2 achieves superior performance compared to these leading models.
|
324 |
+
|
325 |
+
|
326 |
+
<div align="center">
|
327 |
+
<img src="assets/performance.png" alt="" style="width: 90%;" />
|
328 |
+
</div>
|
329 |
+
|
330 |
+
## Citation
|
331 |
+
If you find our work helpful, please cite us.
|
332 |
+
|
333 |
+
```
|
334 |
+
@article{wan2025,
|
335 |
+
title={Wan: Open and Advanced Large-Scale Video Generative Models},
|
336 |
+
author={Team Wan and Ang Wang and Baole Ai and Bin Wen and Chaojie Mao and Chen-Wei Xie and Di Chen and Feiwu Yu and Haiming Zhao and Jianxiao Yang and Jianyuan Zeng and Jiayu Wang and Jingfeng Zhang and Jingren Zhou and Jinkai Wang and Jixuan Chen and Kai Zhu and Kang Zhao and Keyu Yan and Lianghua Huang and Mengyang Feng and Ningyi Zhang and Pandeng Li and Pingyu Wu and Ruihang Chu and Ruili Feng and Shiwei Zhang and Siyang Sun and Tao Fang and Tianxing Wang and Tianyi Gui and Tingyu Weng and Tong Shen and Wei Lin and Wei Wang and Wei Wang and Wenmeng Zhou and Wente Wang and Wenting Shen and Wenyuan Yu and Xianzhong Shi and Xiaoming Huang and Xin Xu and Yan Kou and Yangyu Lv and Yifei Li and Yijing Liu and Yiming Wang and Yingya Zhang and Yitong Huang and Yong Li and You Wu and Yu Liu and Yulin Pan and Yun Zheng and Yuntao Hong and Yupeng Shi and Yutong Feng and Zeyinzi Jiang and Zhen Han and Zhi-Fan Wu and Ziyu Liu},
|
337 |
+
journal = {arXiv preprint arXiv:2503.20314},
|
338 |
+
year={2025}
|
339 |
+
}
|
340 |
+
```
|
341 |
+
|
342 |
+
## License Agreement
|
343 |
+
The models in this repository are licensed under the Apache 2.0 License. We claim no rights over the your generated contents, granting you the freedom to use them while ensuring that your usage complies with the provisions of this license. You are fully accountable for your use of the models, which must not involve sharing any content that violates applicable laws, causes harm to individuals or groups, disseminates personal information intended for harm, spreads misinformation, or targets vulnerable populations. For a complete list of restrictions and details regarding your rights, please refer to the full text of the [license](LICENSE.txt).
|
344 |
+
|
345 |
+
|
346 |
+
## Acknowledgements
|
347 |
+
|
348 |
+
We would like to thank the contributors to the [SD3](https://huggingface.co/stabilityai/stable-diffusion-3-medium), [Qwen](https://huggingface.co/Qwen), [umt5-xxl](https://huggingface.co/google/umt5-xxl), [diffusers](https://github.com/huggingface/diffusers) and [HuggingFace](https://huggingface.co) repositories, for their open research.
|
349 |
+
|
350 |
+
|
351 |
+
|
352 |
+
## Contact Us
|
353 |
+
If you would like to leave a message to our research or product teams, feel free to join our [Discord](https://discord.gg/AKNgpMK4Yj) or [WeChat groups](https://gw.alicdn.com/imgextra/i2/O1CN01tqjWFi1ByuyehkTSB_!!6000000000015-0-tps-611-1279.jpg)!
|
354 |
+
|
assets/comp_effic.png
ADDED
![]() |
Git LFS Details
|
assets/logo.png
ADDED
![]() |
assets/moe_2.png
ADDED
![]() |
Git LFS Details
|
assets/moe_arch.png
ADDED
![]() |
assets/performance.png
ADDED
![]() |
Git LFS Details
|
assets/vae.png
ADDED
![]() |
Git LFS Details
|
config.json
CHANGED
@@ -1,43 +1,44 @@
|
|
1 |
{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
}
|
|
|
|
1 |
{
|
2 |
+
"__name__": "Config: Transformer config for WanModel_S2V",
|
3 |
+
"_class_name": "WanModel_S2V",
|
4 |
+
"_diffusers_version": "0.34.0",
|
5 |
+
"adain_mode": "attn_norm",
|
6 |
+
"add_last_motion": true,
|
7 |
+
"audio_dim": 1024,
|
8 |
+
"audio_inject_layers": [
|
9 |
+
0,
|
10 |
+
4,
|
11 |
+
8,
|
12 |
+
12,
|
13 |
+
16,
|
14 |
+
20,
|
15 |
+
24,
|
16 |
+
27,
|
17 |
+
30,
|
18 |
+
33,
|
19 |
+
36,
|
20 |
+
39
|
21 |
+
],
|
22 |
+
"cond_dim": 16,
|
23 |
+
"dim": 5120,
|
24 |
+
"enable_adain": true,
|
25 |
+
"enable_framepack": true,
|
26 |
+
"enable_motioner": false,
|
27 |
+
"enable_tsm": false,
|
28 |
+
"eps": 1e-06,
|
29 |
+
"ffn_dim": 13824,
|
30 |
+
"framepack_drop_mode": "padd",
|
31 |
+
"freq_dim": 256,
|
32 |
+
"in_dim": 16,
|
33 |
+
"model_type": "s2v",
|
34 |
+
"motion_token_num": 1024,
|
35 |
+
"num_audio_token": 4,
|
36 |
+
"num_heads": 40,
|
37 |
+
"num_layers": 40,
|
38 |
+
"out_dim": 16,
|
39 |
+
"text_len": 512,
|
40 |
+
"trainable_token_pos_emb": false,
|
41 |
+
"zero_init": true,
|
42 |
+
"zero_timestep": true
|
43 |
+
}
|
44 |
+
|
wav2vec2-large-xlsr-53-english/.msc
ADDED
Binary file (2.33 kB). View file
|
|
wav2vec2-large-xlsr-53-english/.mv
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Revision:master,CreatedAt:1730986758
|
wav2vec2-large-xlsr-53-english/README.md
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
datasets:
|
4 |
+
- common_voice
|
5 |
+
- mozilla-foundation/common_voice_6_0
|
6 |
+
metrics:
|
7 |
+
- wer
|
8 |
+
- cer
|
9 |
+
tags:
|
10 |
+
- audio
|
11 |
+
- automatic-speech-recognition
|
12 |
+
- en
|
13 |
+
- hf-asr-leaderboard
|
14 |
+
- mozilla-foundation/common_voice_6_0
|
15 |
+
- robust-speech-event
|
16 |
+
- speech
|
17 |
+
- xlsr-fine-tuning-week
|
18 |
+
license: apache-2.0
|
19 |
+
model-index:
|
20 |
+
- name: XLSR Wav2Vec2 English by Jonatas Grosman
|
21 |
+
results:
|
22 |
+
- task:
|
23 |
+
name: Automatic Speech Recognition
|
24 |
+
type: automatic-speech-recognition
|
25 |
+
dataset:
|
26 |
+
name: Common Voice en
|
27 |
+
type: common_voice
|
28 |
+
args: en
|
29 |
+
metrics:
|
30 |
+
- name: Test WER
|
31 |
+
type: wer
|
32 |
+
value: 19.06
|
33 |
+
- name: Test CER
|
34 |
+
type: cer
|
35 |
+
value: 7.69
|
36 |
+
- name: Test WER (+LM)
|
37 |
+
type: wer
|
38 |
+
value: 14.81
|
39 |
+
- name: Test CER (+LM)
|
40 |
+
type: cer
|
41 |
+
value: 6.84
|
42 |
+
- task:
|
43 |
+
name: Automatic Speech Recognition
|
44 |
+
type: automatic-speech-recognition
|
45 |
+
dataset:
|
46 |
+
name: Robust Speech Event - Dev Data
|
47 |
+
type: speech-recognition-community-v2/dev_data
|
48 |
+
args: en
|
49 |
+
metrics:
|
50 |
+
- name: Dev WER
|
51 |
+
type: wer
|
52 |
+
value: 27.72
|
53 |
+
- name: Dev CER
|
54 |
+
type: cer
|
55 |
+
value: 11.65
|
56 |
+
- name: Dev WER (+LM)
|
57 |
+
type: wer
|
58 |
+
value: 20.85
|
59 |
+
- name: Dev CER (+LM)
|
60 |
+
type: cer
|
61 |
+
value: 11.01
|
62 |
+
---
|
63 |
+
|
64 |
+
# Fine-tuned XLSR-53 large model for speech recognition in English
|
65 |
+
|
66 |
+
Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on English using the train and validation splits of [Common Voice 6.1](https://huggingface.co/datasets/common_voice).
|
67 |
+
When using this model, make sure that your speech input is sampled at 16kHz.
|
68 |
+
|
69 |
+
This model has been fine-tuned thanks to the GPU credits generously given by the [OVHcloud](https://www.ovhcloud.com/en/public-cloud/ai-training/) :)
|
70 |
+
|
71 |
+
The script used for training can be found here: https://github.com/jonatasgrosman/wav2vec2-sprint
|
72 |
+
|
73 |
+
## Usage
|
74 |
+
|
75 |
+
The model can be used directly (without a language model) as follows...
|
76 |
+
|
77 |
+
Using the [HuggingSound](https://github.com/jonatasgrosman/huggingsound) library:
|
78 |
+
|
79 |
+
```python
|
80 |
+
from huggingsound import SpeechRecognitionModel
|
81 |
+
|
82 |
+
model = SpeechRecognitionModel("jonatasgrosman/wav2vec2-large-xlsr-53-english")
|
83 |
+
audio_paths = ["/path/to/file.mp3", "/path/to/another_file.wav"]
|
84 |
+
|
85 |
+
transcriptions = model.transcribe(audio_paths)
|
86 |
+
```
|
87 |
+
|
88 |
+
Writing your own inference script:
|
89 |
+
|
90 |
+
```python
|
91 |
+
import torch
|
92 |
+
import librosa
|
93 |
+
from datasets import load_dataset
|
94 |
+
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
|
95 |
+
|
96 |
+
LANG_ID = "en"
|
97 |
+
MODEL_ID = "jonatasgrosman/wav2vec2-large-xlsr-53-english"
|
98 |
+
SAMPLES = 10
|
99 |
+
|
100 |
+
test_dataset = load_dataset("common_voice", LANG_ID, split=f"test[:{SAMPLES}]")
|
101 |
+
|
102 |
+
processor = Wav2Vec2Processor.from_pretrained(MODEL_ID)
|
103 |
+
model = Wav2Vec2ForCTC.from_pretrained(MODEL_ID)
|
104 |
+
|
105 |
+
# Preprocessing the datasets.
|
106 |
+
# We need to read the audio files as arrays
|
107 |
+
def speech_file_to_array_fn(batch):
|
108 |
+
speech_array, sampling_rate = librosa.load(batch["path"], sr=16_000)
|
109 |
+
batch["speech"] = speech_array
|
110 |
+
batch["sentence"] = batch["sentence"].upper()
|
111 |
+
return batch
|
112 |
+
|
113 |
+
test_dataset = test_dataset.map(speech_file_to_array_fn)
|
114 |
+
inputs = processor(test_dataset["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
|
115 |
+
|
116 |
+
with torch.no_grad():
|
117 |
+
logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
|
118 |
+
|
119 |
+
predicted_ids = torch.argmax(logits, dim=-1)
|
120 |
+
predicted_sentences = processor.batch_decode(predicted_ids)
|
121 |
+
|
122 |
+
for i, predicted_sentence in enumerate(predicted_sentences):
|
123 |
+
print("-" * 100)
|
124 |
+
print("Reference:", test_dataset[i]["sentence"])
|
125 |
+
print("Prediction:", predicted_sentence)
|
126 |
+
```
|
127 |
+
|
128 |
+
| Reference | Prediction |
|
129 |
+
| ------------- | ------------- |
|
130 |
+
| "SHE'LL BE ALL RIGHT." | SHE'LL BE ALL RIGHT |
|
131 |
+
| SIX | SIX |
|
132 |
+
| "ALL'S WELL THAT ENDS WELL." | ALL AS WELL THAT ENDS WELL |
|
133 |
+
| DO YOU MEAN IT? | DO YOU MEAN IT |
|
134 |
+
| THE NEW PATCH IS LESS INVASIVE THAN THE OLD ONE, BUT STILL CAUSES REGRESSIONS. | THE NEW PATCH IS LESS INVASIVE THAN THE OLD ONE BUT STILL CAUSES REGRESSION |
|
135 |
+
| HOW IS MOZILLA GOING TO HANDLE AMBIGUITIES LIKE QUEUE AND CUE? | HOW IS MOSLILLAR GOING TO HANDLE ANDBEWOOTH HIS LIKE Q AND Q |
|
136 |
+
| "I GUESS YOU MUST THINK I'M KINDA BATTY." | RUSTIAN WASTIN PAN ONTE BATTLY |
|
137 |
+
| NO ONE NEAR THE REMOTE MACHINE YOU COULD RING? | NO ONE NEAR THE REMOTE MACHINE YOU COULD RING |
|
138 |
+
| SAUCE FOR THE GOOSE IS SAUCE FOR THE GANDER. | SAUCE FOR THE GUICE IS SAUCE FOR THE GONDER |
|
139 |
+
| GROVES STARTED WRITING SONGS WHEN SHE WAS FOUR YEARS OLD. | GRAFS STARTED WRITING SONGS WHEN SHE WAS FOUR YEARS OLD |
|
140 |
+
|
141 |
+
## Evaluation
|
142 |
+
|
143 |
+
1. To evaluate on `mozilla-foundation/common_voice_6_0` with split `test`
|
144 |
+
|
145 |
+
```bash
|
146 |
+
python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-english --dataset mozilla-foundation/common_voice_6_0 --config en --split test
|
147 |
+
```
|
148 |
+
|
149 |
+
2. To evaluate on `speech-recognition-community-v2/dev_data`
|
150 |
+
|
151 |
+
```bash
|
152 |
+
python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-english --dataset speech-recognition-community-v2/dev_data --config en --split validation --chunk_length_s 5.0 --stride_length_s 1.0
|
153 |
+
```
|
154 |
+
|
155 |
+
## Citation
|
156 |
+
If you want to cite this model you can use this:
|
157 |
+
|
158 |
+
```bibtex
|
159 |
+
@misc{grosman2021xlsr53-large-english,
|
160 |
+
title={Fine-tuned {XLSR}-53 large model for speech recognition in {E}nglish},
|
161 |
+
author={Grosman, Jonatas},
|
162 |
+
howpublished={\url{https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-english}},
|
163 |
+
year={2021}
|
164 |
+
}
|
165 |
+
```
|
wav2vec2-large-xlsr-53-english/alphabet.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"labels": ["", "<s>", "</s>", "⁇", " ", "'", "-", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], "is_bpe": false}
|
wav2vec2-large-xlsr-53-english/config.json
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "facebook/wav2vec2-large-xlsr-53",
|
3 |
+
"activation_dropout": 0.05,
|
4 |
+
"apply_spec_augment": true,
|
5 |
+
"architectures": [
|
6 |
+
"Wav2Vec2ForCTC"
|
7 |
+
],
|
8 |
+
"attention_dropout": 0.1,
|
9 |
+
"bos_token_id": 1,
|
10 |
+
"conv_bias": true,
|
11 |
+
"conv_dim": [
|
12 |
+
512,
|
13 |
+
512,
|
14 |
+
512,
|
15 |
+
512,
|
16 |
+
512,
|
17 |
+
512,
|
18 |
+
512
|
19 |
+
],
|
20 |
+
"conv_kernel": [
|
21 |
+
10,
|
22 |
+
3,
|
23 |
+
3,
|
24 |
+
3,
|
25 |
+
3,
|
26 |
+
2,
|
27 |
+
2
|
28 |
+
],
|
29 |
+
"conv_stride": [
|
30 |
+
5,
|
31 |
+
2,
|
32 |
+
2,
|
33 |
+
2,
|
34 |
+
2,
|
35 |
+
2,
|
36 |
+
2
|
37 |
+
],
|
38 |
+
"ctc_loss_reduction": "mean",
|
39 |
+
"ctc_zero_infinity": true,
|
40 |
+
"do_stable_layer_norm": true,
|
41 |
+
"eos_token_id": 2,
|
42 |
+
"feat_extract_activation": "gelu",
|
43 |
+
"feat_extract_dropout": 0.0,
|
44 |
+
"feat_extract_norm": "layer",
|
45 |
+
"feat_proj_dropout": 0.05,
|
46 |
+
"final_dropout": 0.0,
|
47 |
+
"hidden_act": "gelu",
|
48 |
+
"hidden_dropout": 0.05,
|
49 |
+
"hidden_size": 1024,
|
50 |
+
"initializer_range": 0.02,
|
51 |
+
"intermediate_size": 4096,
|
52 |
+
"layer_norm_eps": 1e-05,
|
53 |
+
"layerdrop": 0.05,
|
54 |
+
"mask_channel_length": 10,
|
55 |
+
"mask_channel_min_space": 1,
|
56 |
+
"mask_channel_other": 0.0,
|
57 |
+
"mask_channel_prob": 0.0,
|
58 |
+
"mask_channel_selection": "static",
|
59 |
+
"mask_feature_length": 10,
|
60 |
+
"mask_feature_prob": 0.0,
|
61 |
+
"mask_time_length": 10,
|
62 |
+
"mask_time_min_space": 1,
|
63 |
+
"mask_time_other": 0.0,
|
64 |
+
"mask_time_prob": 0.05,
|
65 |
+
"mask_time_selection": "static",
|
66 |
+
"model_type": "wav2vec2",
|
67 |
+
"num_attention_heads": 16,
|
68 |
+
"num_conv_pos_embedding_groups": 16,
|
69 |
+
"num_conv_pos_embeddings": 128,
|
70 |
+
"num_feat_extract_layers": 7,
|
71 |
+
"num_hidden_layers": 24,
|
72 |
+
"pad_token_id": 0,
|
73 |
+
"transformers_version": "4.7.0.dev0",
|
74 |
+
"vocab_size": 33
|
75 |
+
}
|
wav2vec2-large-xlsr-53-english/configuration.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"framework": "pytorch", "task": "automatic-speech-recognition", "allow_remote": true}
|
wav2vec2-large-xlsr-53-english/eval.py
ADDED
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python3
|
2 |
+
from datasets import load_dataset, load_metric, Audio, Dataset
|
3 |
+
from transformers import pipeline, AutoFeatureExtractor, AutoTokenizer, AutoConfig, AutoModelForCTC, Wav2Vec2Processor, Wav2Vec2ProcessorWithLM
|
4 |
+
import re
|
5 |
+
import torch
|
6 |
+
import argparse
|
7 |
+
from typing import Dict
|
8 |
+
|
9 |
+
def log_results(result: Dataset, args: Dict[str, str]):
|
10 |
+
""" DO NOT CHANGE. This function computes and logs the result metrics. """
|
11 |
+
|
12 |
+
log_outputs = args.log_outputs
|
13 |
+
dataset_id = "_".join(args.dataset.split("/") + [args.config, args.split])
|
14 |
+
|
15 |
+
# load metric
|
16 |
+
wer = load_metric("wer")
|
17 |
+
cer = load_metric("cer")
|
18 |
+
|
19 |
+
# compute metrics
|
20 |
+
wer_result = wer.compute(references=result["target"], predictions=result["prediction"])
|
21 |
+
cer_result = cer.compute(references=result["target"], predictions=result["prediction"])
|
22 |
+
|
23 |
+
# print & log results
|
24 |
+
result_str = (
|
25 |
+
f"WER: {wer_result}\n"
|
26 |
+
f"CER: {cer_result}"
|
27 |
+
)
|
28 |
+
print(result_str)
|
29 |
+
|
30 |
+
with open(f"{dataset_id}_eval_results.txt", "w") as f:
|
31 |
+
f.write(result_str)
|
32 |
+
|
33 |
+
# log all results in text file. Possibly interesting for analysis
|
34 |
+
if log_outputs is not None:
|
35 |
+
pred_file = f"log_{dataset_id}_predictions.txt"
|
36 |
+
target_file = f"log_{dataset_id}_targets.txt"
|
37 |
+
|
38 |
+
with open(pred_file, "w") as p, open(target_file, "w") as t:
|
39 |
+
|
40 |
+
# mapping function to write output
|
41 |
+
def write_to_file(batch, i):
|
42 |
+
p.write(f"{i}" + "\n")
|
43 |
+
p.write(batch["prediction"] + "\n")
|
44 |
+
t.write(f"{i}" + "\n")
|
45 |
+
t.write(batch["target"] + "\n")
|
46 |
+
|
47 |
+
result.map(write_to_file, with_indices=True)
|
48 |
+
|
49 |
+
|
50 |
+
def normalize_text(text: str, invalid_chars_regex: str, to_lower: bool) -> str:
|
51 |
+
""" DO ADAPT FOR YOUR USE CASE. this function normalizes the target text. """
|
52 |
+
|
53 |
+
text = text.lower() if to_lower else text.upper()
|
54 |
+
|
55 |
+
text = re.sub(invalid_chars_regex, " ", text)
|
56 |
+
|
57 |
+
text = re.sub("\s+", " ", text).strip()
|
58 |
+
|
59 |
+
return text
|
60 |
+
|
61 |
+
|
62 |
+
def main(args):
|
63 |
+
# load dataset
|
64 |
+
dataset = load_dataset(args.dataset, args.config, split=args.split, use_auth_token=True)
|
65 |
+
|
66 |
+
# for testing: only process the first two examples as a test
|
67 |
+
# dataset = dataset.select(range(10))
|
68 |
+
|
69 |
+
# load processor
|
70 |
+
if args.greedy:
|
71 |
+
processor = Wav2Vec2Processor.from_pretrained(args.model_id)
|
72 |
+
decoder = None
|
73 |
+
else:
|
74 |
+
processor = Wav2Vec2ProcessorWithLM.from_pretrained(args.model_id)
|
75 |
+
decoder = processor.decoder
|
76 |
+
|
77 |
+
feature_extractor = processor.feature_extractor
|
78 |
+
tokenizer = processor.tokenizer
|
79 |
+
|
80 |
+
# resample audio
|
81 |
+
dataset = dataset.cast_column("audio", Audio(sampling_rate=feature_extractor.sampling_rate))
|
82 |
+
|
83 |
+
# load eval pipeline
|
84 |
+
if args.device is None:
|
85 |
+
args.device = 0 if torch.cuda.is_available() else -1
|
86 |
+
|
87 |
+
config = AutoConfig.from_pretrained(args.model_id)
|
88 |
+
model = AutoModelForCTC.from_pretrained(args.model_id)
|
89 |
+
|
90 |
+
#asr = pipeline("automatic-speech-recognition", model=args.model_id, device=args.device)
|
91 |
+
asr = pipeline("automatic-speech-recognition", config=config, model=model, tokenizer=tokenizer,
|
92 |
+
feature_extractor=feature_extractor, decoder=decoder, device=args.device)
|
93 |
+
|
94 |
+
# build normalizer config
|
95 |
+
tokenizer = AutoTokenizer.from_pretrained(args.model_id)
|
96 |
+
tokens = [x for x in tokenizer.convert_ids_to_tokens(range(0, tokenizer.vocab_size))]
|
97 |
+
special_tokens = [
|
98 |
+
tokenizer.pad_token, tokenizer.word_delimiter_token,
|
99 |
+
tokenizer.unk_token, tokenizer.bos_token,
|
100 |
+
tokenizer.eos_token,
|
101 |
+
]
|
102 |
+
non_special_tokens = [x for x in tokens if x not in special_tokens]
|
103 |
+
invalid_chars_regex = f"[^\s{re.escape(''.join(set(non_special_tokens)))}]"
|
104 |
+
normalize_to_lower = False
|
105 |
+
for token in non_special_tokens:
|
106 |
+
if token.isalpha() and token.islower():
|
107 |
+
normalize_to_lower = True
|
108 |
+
break
|
109 |
+
|
110 |
+
# map function to decode audio
|
111 |
+
def map_to_pred(batch, args=args, asr=asr, invalid_chars_regex=invalid_chars_regex, normalize_to_lower=normalize_to_lower):
|
112 |
+
prediction = asr(batch["audio"]["array"], chunk_length_s=args.chunk_length_s, stride_length_s=args.stride_length_s)
|
113 |
+
|
114 |
+
batch["prediction"] = prediction["text"]
|
115 |
+
batch["target"] = normalize_text(batch["sentence"], invalid_chars_regex, normalize_to_lower)
|
116 |
+
return batch
|
117 |
+
|
118 |
+
# run inference on all examples
|
119 |
+
result = dataset.map(map_to_pred, remove_columns=dataset.column_names)
|
120 |
+
|
121 |
+
# filtering out empty targets
|
122 |
+
result = result.filter(lambda example: example["target"] != "")
|
123 |
+
|
124 |
+
# compute and log_results
|
125 |
+
# do not change function below
|
126 |
+
log_results(result, args)
|
127 |
+
|
128 |
+
|
129 |
+
if __name__ == "__main__":
|
130 |
+
parser = argparse.ArgumentParser()
|
131 |
+
|
132 |
+
parser.add_argument(
|
133 |
+
"--model_id", type=str, required=True, help="Model identifier. Should be loadable with 🤗 Transformers"
|
134 |
+
)
|
135 |
+
parser.add_argument(
|
136 |
+
"--dataset", type=str, required=True, help="Dataset name to evaluate the `model_id`. Should be loadable with 🤗 Datasets"
|
137 |
+
)
|
138 |
+
parser.add_argument(
|
139 |
+
"--config", type=str, required=True, help="Config of the dataset. *E.g.* `'en'` for Common Voice"
|
140 |
+
)
|
141 |
+
parser.add_argument(
|
142 |
+
"--split", type=str, required=True, help="Split of the dataset. *E.g.* `'test'`"
|
143 |
+
)
|
144 |
+
parser.add_argument(
|
145 |
+
"--chunk_length_s", type=float, default=None, help="Chunk length in seconds. Defaults to None. For long audio files a good value would be 5.0 seconds."
|
146 |
+
)
|
147 |
+
parser.add_argument(
|
148 |
+
"--stride_length_s", type=float, default=None, help="Stride of the audio chunks. Defaults to None. For long audio files a good value would be 1.0 seconds."
|
149 |
+
)
|
150 |
+
parser.add_argument(
|
151 |
+
"--log_outputs", action='store_true', help="If defined, write outputs to log file for analysis."
|
152 |
+
)
|
153 |
+
parser.add_argument(
|
154 |
+
"--greedy", action='store_true', help="If defined, the LM will be ignored during inference."
|
155 |
+
)
|
156 |
+
parser.add_argument(
|
157 |
+
"--device",
|
158 |
+
type=int,
|
159 |
+
default=None,
|
160 |
+
help="The device to run the pipeline on. -1 for CPU (default), 0 for the first GPU and so on.",
|
161 |
+
)
|
162 |
+
args = parser.parse_args()
|
163 |
+
|
164 |
+
main(args)
|
wav2vec2-large-xlsr-53-english/flax_model.msgpack
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d3842440388a575e19f19cdb05714afd7018392bd1a7e247c601530a653aa40
|
3 |
+
size 1261905572
|
wav2vec2-large-xlsr-53-english/full_eval.sh
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CV - TEST
|
2 |
+
|
3 |
+
python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-english --dataset mozilla-foundation/common_voice_6_0 --config en --split test --log_outputs --greedy
|
4 |
+
mv log_mozilla-foundation_common_voice_6_0_en_test_predictions.txt log_mozilla-foundation_common_voice_6_0_en_test_predictions_greedy.txt
|
5 |
+
mv mozilla-foundation_common_voice_6_0_en_test_eval_results.txt mozilla-foundation_common_voice_6_0_en_test_eval_results_greedy.txt
|
6 |
+
|
7 |
+
python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-english --dataset mozilla-foundation/common_voice_6_0 --config en --split test --log_outputs
|
8 |
+
|
9 |
+
# HF EVENT - DEV
|
10 |
+
|
11 |
+
python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-english --dataset speech-recognition-community-v2/dev_data --config en --split validation --chunk_length_s 5.0 --stride_length_s 1.0 --log_outputs --greedy
|
12 |
+
mv log_speech-recognition-community-v2_dev_data_en_validation_predictions.txt log_speech-recognition-community-v2_dev_data_en_validation_predictions_greedy.txt
|
13 |
+
mv speech-recognition-community-v2_dev_data_en_validation_eval_results.txt speech-recognition-community-v2_dev_data_en_validation_eval_results_greedy.txt
|
14 |
+
|
15 |
+
python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-english --dataset speech-recognition-community-v2/dev_data --config en --split validation --chunk_length_s 5.0 --stride_length_s 1.0 --log_outputs
|
wav2vec2-large-xlsr-53-english/language_model/attrs.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"alpha": 0.5, "beta": 1.5, "unk_score_offset": -10.0, "score_boundary": true}
|
wav2vec2-large-xlsr-53-english/language_model/lm.binary
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47e16abf6384ebd1b3395144330b60710dc43f3d16c4b2b4794071cd117230e5
|
3 |
+
size 862913451
|
wav2vec2-large-xlsr-53-english/language_model/unigrams.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
wav2vec2-large-xlsr-53-english/log_mozilla-foundation_common_voice_6_0_en_test_predictions.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
wav2vec2-large-xlsr-53-english/log_mozilla-foundation_common_voice_6_0_en_test_predictions_greedy.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
wav2vec2-large-xlsr-53-english/log_mozilla-foundation_common_voice_6_0_en_test_targets.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
wav2vec2-large-xlsr-53-english/log_speech-recognition-community-v2_dev_data_en_validation_predictions.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
wav2vec2-large-xlsr-53-english/log_speech-recognition-community-v2_dev_data_en_validation_predictions_greedy.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
wav2vec2-large-xlsr-53-english/log_speech-recognition-community-v2_dev_data_en_validation_targets.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
wav2vec2-large-xlsr-53-english/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6144f8464c6aaa220dd57c5a2ad4039b5710dcf8ee6e67057675f76597c19875
|
3 |
+
size 1261942732
|
wav2vec2-large-xlsr-53-english/mozilla-foundation_common_voice_6_0_en_test_eval_results.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
WER: 0.1481828839390387
|
2 |
+
CER: 0.06848087313203592
|
wav2vec2-large-xlsr-53-english/mozilla-foundation_common_voice_6_0_en_test_eval_results_greedy.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
WER: 0.19067492882264278
|
2 |
+
CER: 0.07694957927516068
|
wav2vec2-large-xlsr-53-english/preprocessor_config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"feature_extractor_type": "Wav2Vec2FeatureExtractor",
|
4 |
+
"feature_size": 1,
|
5 |
+
"padding_side": "right",
|
6 |
+
"padding_value": 0.0,
|
7 |
+
"return_attention_mask": true,
|
8 |
+
"sampling_rate": 16000,
|
9 |
+
"processor_class": "Wav2Vec2ProcessorWithLM"
|
10 |
+
}
|
wav2vec2-large-xlsr-53-english/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7b7688644eeefe1f5760bb4c4a61d085793a3740159fdbf19fd37c5d4f3729bf
|
3 |
+
size 1262069143
|
wav2vec2-large-xlsr-53-english/special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>"}
|
wav2vec2-large-xlsr-53-english/speech-recognition-community-v2_dev_data_en_validation_eval_results.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
WER: 0.2085057090848916
|
2 |
+
CER: 0.11011805154105943
|
wav2vec2-large-xlsr-53-english/speech-recognition-community-v2_dev_data_en_validation_eval_results_greedy.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
WER: 0.27722157868608305
|
2 |
+
CER: 0.11652265190008215
|
wav2vec2-large-xlsr-53-english/vocab.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"<pad>": 0, "<s>": 1, "</s>": 2, "<unk>": 3, "|": 4, "'": 5, "-": 6, "a": 7, "b": 8, "c": 9, "d": 10, "e": 11, "f": 12, "g": 13, "h": 14, "i": 15, "j": 16, "k": 17, "l": 18, "m": 19, "n": 20, "o": 21, "p": 22, "q": 23, "r": 24, "s": 25, "t": 26, "u": 27, "v": 28, "w": 29, "x": 30, "y": 31, "z": 32}
|