Installation Guide
The installation process for MultiTalk requires configuring the Python environment and downloading model weights. Below are detailed installation instructions.
Environment Requirements
Hardware Requirements
MultiTalk is a large video generation model with high hardware requirements. NVIDIA GPUs are recommended for running. VRAM requirements vary depending on output resolution. Generating 480P videos requires at least 16GB of VRAM, while generating 720P videos requires multiple GPU configurations. The project also supports running in low VRAM environments, enabling 480P video generation on a single RTX 4090 through specific optimizations.
Software Requirements
Linux operating system is supported. Python version 3.10 or higher is required. CUDA 12.1 or higher is also required. The project depends on deep learning frameworks such as PyTorch 2.4.1 and xformers.
Creating Virtual Environment
First, create a new Python virtual environment to isolate project dependencies. Open the terminal and execute the following commands:
conda create -n multitalk python=3.10
conda activate multitalk
Installing PyTorch and xformers
Install PyTorch and related packages in the activated environment. Execute the following command to install PyTorch 2.4.1:
pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 --index-url https://download.pytorch.org/whl/cu121
Next, install xformers:
pip install -U xformers==0.0.28 --index-url https://download.pytorch.org/whl/cu121
Installing Project Dependencies
Install other necessary dependency packages:
pip install misaki[en]
pip install ninja
pip install psutil
pip install packaging
pip install flash_attn==2.7.4.post1
Then clone the project repository and install project dependencies:
git clone https://github.com/MeiGen-AI/MultiTalk.git
cd MultiTalk
pip install -r requirements.txt
Installing Audio Processing Libraries
The project requires audio processing related libraries. Execute the following commands to install:
conda install -c conda-forge librosa
conda install -c conda-forge ffmpeg
For CentOS or RHEL systems, use:
sudo yum install ffmpeg ffmpeg-devel
Downloading Model Weights
MultiTalk requires downloading multiple model files to run properly. The main models include:
Wan2.1-I2V-14B-480P is the base diffusion model, downloadable from Hugging Face. chinese-wav2vec2-base is the audio encoder for processing input audio. Kokoro-82M is the TTS weights for text-to-speech functionality. MeiGen-MultiTalk is the audio condition weights provided by the project.
Download models using huggingface-cli:
huggingface-cli download Wan-AI/Wan2.1-I2V-14B-480P --local-dir ./weights/Wan2.1-I2V-14B-480P
huggingface-cli download TencentGameMate/chinese-wav2vec2-base --local-dir ./weights/chinese-wav2vec2-base
huggingface-cli download hexgrad/Kokoro-82M --local-dir ./weights/Kokoro-82M
huggingface-cli download MeiGen-AI/MeiGen-MultiTalk --local-dir ./weights/MeiGen-MultiTalk
Configuring Model Links
After downloading the models, you need to configure the links. There are two options available.
Option one is using symbolic links. Enter the weights directory and execute:
cd weights
mv Wan2.1-I2V-14B-480P/diffusion_pytorch_model.safetensors.index.json Wan2.1-I2V-14B-480P/diffusion_pytorch_model.safetensors.index.json_old
ln -s /path/to/weights/MeiGen-MultiTalk/diffusion_pytorch_model.safetensors.index.json Wan2.1-I2V-14B-480P/
ln -s /path/to/weights/MeiGen-MultiTalk/multitalk.safetensors Wan2.1-I2V-14B-480P/
Option two is copying files directly:
cd weights
mv Wan2.1-I2V-14B-480P/diffusion_pytorch_model.safetensors.index.json Wan2.1-I2V-14B-480P/diffusion_pytorch_model.safetensors.index.json_old
cp MeiGen-MultiTalk/diffusion_pytorch_model.safetensors_index.json Wan2.1-I2V-14B-480P/
cp MeiGen-MultiTalk/multitalk.safetensors Wan2.1-I2V-14B-480P/
Verifying Installation
After installation is complete, you can run example scripts to verify the installation. Example files are provided in the examples directory.
