Wan: Open and Advanced Large-Scale Video Generative Models

We read every piece of feedback, and take your input very seriously. To see all available qualifiers, see our documentation. Wan: Open and Advanced Large-Scale Video Generative Models There was an error while loading. Please reload this page. 💜 Wan    |    🖥️ GitHub    |   🤗 Hugging Face   |   🤖 ModelScope   |    📑 Technical Report    |    📑 Blog    |   💬 WeChat Group   |    📖 Discord   Wan: Open and Advanced Large-Scale Video Generative Models In this repository, we present Wan2.1, a comprehensive and open suite of video foundation models that pushes the boundaries of video generation. Wan2.1 offers these key features: If your work has improved Wan2.1 and you would like more people to see it, please inform us. Clone the repo: Install dependencies: 💡Note: Download models using huggingface-cli: Download models using modelscope-cli: This repository supports two Text-to-Video models (1.3B and 14B) and two resolutions (480P and 720P). The parameters and configurations for these models are as follows: To facilitate implementation, we will start with a basic version of the inference process that skips the prompt extension step. If you encounter OOM (Out-of-Memory) issues, you can use the --offload_model True and --t5_cpu options to reduce GPU memory usage. For example, on an RTX 4090 GPU: 💡Note: If you are using the T2V-1.3B model, we recommend setting the parameter --sample_guide_scale 6. The --sample_shift parameter can be adjusted within the range of 8 to 12 based on the performance. Multi-GPU inference using FSDP + xDiT USP We use FSDP and xDiT USP to accelerate inference. Ulysess Strategy If you want to use Ulysses strategy, you should set --ulysses_size $GPU_NUMS. Note that the num_heads should be divisible by ulysses_size if you wish to use Ulysess strategy. For the 1.3B model, the num_heads is 12 which can't be divided by 8 (as most multi-GPU machines have 8 GPUs). Therefore, it is recommended to use Ring Strategy instead. Ring Strategy If you want to use Ring strategy, you should set --ring_size $GPU_NUMS. Note that the sequence length should be divisible by ring_size when using the Ring strategy. Of course, you can also combine the use of Ulysses and Ring strategies. 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: Using a local model for extension. You can easily inference Wan2.1-T2V using Diffusers with the following command: 💡Note: Please note that this example does not integrate Prompt Extension and distributed inference. We will soon update with the integrated prompt extension and multi-GPU version of Diffusers. Similar to Text-to-Video, Image-to-Video is also divided into processes with and without the prompt extension step. The specific parameters and their corresponding settings are as follows: 💡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. The process of prompt extension can be referenced here. Run with local prompt extension using Qwen/Qwen2.5-VL-7B-Instruct: Run with remote prompt extension using dashscope: You can easily inference Wan2.1-I2V using Diffusers with the following command: 💡Note: Please note that this example does not integrate Prompt Extension and distributed inference. We will soon update with the integrated prompt extension and multi-GPU version of Diffusers. First-Last-Frame-to-Video is also divided into processes with and without the prompt extension step. Currently, only 720P is supported. The specific parameters and corresponding settings are as follows: 💡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. The process of prompt extension can be referenced here. Run with local prompt extension using Qwen/Qwen2.5-VL-7B-Instruct: Run with remote prompt extension using dashscope: VACE now supports two models (1.3B and 14B) and two main resolutions (480P and 720P). The input supports any resolution, but to achieve optimal results, the video size should fall within a specific range. The parameters and configurations for these models are as follows: In VACE, users can input text prompt and optional video, mask, and image for video generation or editing. Detailed instructions for using VACE can be found in the User Guide. The execution process is as follows: User-collected materials needs to be preprocessed into VACE-recognizable inputs, including src_video, src_mask, src_ref_images, and prompt. For R2V (Reference-to-Video Generation), you may skip this preprocessing, but for V2V (Video-to-Video Editing) and MV2V (Masked Video-to-Video Editing) tasks, additional preprocessing is required to obtain video with conditions such as depth, pose or masked regions. For more details, please refer to vace_preproccess. Wan2.1 is a unified model for both image and video generation. Since it was trained on both types of data, it can also generate images. The command for generating images is similar to video generation, as follows: Through manual evaluation, the results generated after prompt extension are superior to those from both closed-source and open-source models. We also conducted extensive manual evaluations to evaluate the performance of the Image-to-Video model, and the results are presented in the table below. The results clearly indicate that Wan2.1 outperforms both closed-source and open-source models. We test the computational efficiency of different Wan2.1 models on different GPUs in the following table. The results are presented in the format: Total time (s) / peak GPU memory (GB). The parameter settings for the tests presented in this table are as follows: (1) For the 1.3B model on 8 GPUs, set --ring_size 8 and --ulysses_size 1; (2) For the 14B model on 1 GPU, use --offload_model True; (3) For the 1.3B model on a single 4090 GPU, set --offload_model True --t5_cpu; (4) For all testings, no prompt extension was applied, meaning --use_prompt_extend was not enabled. 💡Note: T2V-14B is slower than I2V-14B because the former samples 50 steps while the latter uses 40 steps. Wan2.1 is designed on the mainstream diffusion transformer paradigm, achieving significant advancements in generative capabilities through a series of innovations. These include our novel spatio-temporal variational autoencoder (VAE), scalable training strategies, large-scale data construction, and automated evaluation metrics. Collectively, these contributions enhance the model’s performance and versatility. We propose a novel 3D causal VAE architecture, termed Wan-VAE specifically designed for video generation. By combining multiple strategies, we improve spatio-temporal compression, reduce memory usage, and ensure temporal causality. Wan-VAE demonstrates significant advantages in performance efficiency compared to other open-source VAEs. Furthermore, our Wan-VAE can encode and decode unlimited-length 1080P videos without losing historical temporal information, making it particularly well-suited for video generation tasks. Wan2.1 is designed using the Flow Matching framework within the paradigm of mainstream Diffusion Transformers. Our model's architecture uses the T5 Encoder to encode multilingual text input, with cross-attention in each transformer block embedding the text into the model structure. Additionally, we employ an MLP with a Linear layer and a SiLU layer to process the input time embeddings and predict six modulation parameters individually. This MLP is shared across all transformer blocks, with each block learning a distinct set of biases. Our experimental findings reveal a significant performance improvement with this approach at the same parameter scale. We curated and deduplicated a candidate dataset comprising a vast amount of image and video data. During the data curation process, we designed a four-step data cleaning process, focusing on fundamental dimensions, visual quality and motion quality. Through the robust data processing pipeline, we can easily obtain high-quality, diverse, and large-scale training sets of images and videos. We compared Wan2.1 with leading open-source and closed-source models to evaluate the performance. Using our carefully designed set of 1,035 internal prompts, we tested across 14 major dimensions and 26 sub-dimensions. We then compute the total score by performing a weighted calculation on the scores of each dimension, utilizing weights derived from human preferences in the matching process. The detailed results are shown in the table below. These results demonstrate our model's superior performance compared to both open-source and closed-source models. If you find our work helpful, please cite us. 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. We would like to thank the contributors to the SD3, Qwen, umt5-xxl, diffusers and HuggingFace repositories, for their open research. If you would like to leave a message to our research or product teams, feel free to join our Discord or WeChat groups! Wan: Open and Advanced Large-Scale Video Generative Models There was an error while loading. Please reload this page. There was an error while loading. Please reload this page.

Rp.10.000
Rp.100.000-90%
Kuantitas