A Docker setup for running the Wan Video Generator using DiffSynth-Studio's WanVideoPipeline, optimized for NVIDIA RTX 3090 GPUs.
Before you begin, make sure you have installed:
- Docker Desktop (for Windows/Mac) or Docker Engine (for Linux)
- NVIDIA Container Toolkit (for GPU support)
- An NVIDIA GPU with at least 24GB VRAM (RTX 3090 or equivalent)
-
Start Docker
- Launch Docker Desktop if you're on Windows/Mac
- On Linux, ensure the Docker service is running:
sudo systemctl start docker
-
Open a Terminal/Command Prompt
- Windows: Press Win+R, type
cmdand press Enter - Mac: Open Terminal from Applications/Utilities
- Linux: Open your terminal application
- Windows: Press Win+R, type
-
Navigate to Where You Want to Install
- Use the
cdcommand to go to your preferred directory:# Example: installing in your Documents folder cd Documents
- Use the
-
Clone the Repository
git clone https://github.com/YourUsername/DreamBox_Wan cd DreamBox_Wan -
Build the Docker Image
- This step downloads the models automatically (may take 5-15 minutes depending on your internet speed)
docker compose build
-
Run the Container
docker compose up -d
-
Access the UI
- Open your web browser
- Navigate to: http://localhost:7860
- You should see the Wan Video Generator interface
-
When Finished
- To stop the container:
docker compose down
- Docker
- Docker Compose
- NVIDIA Container Toolkit
- NVIDIA GPU with at least 24GB VRAM (RTX 3090 or equivalent)
-
Docker isn't running
- Make sure Docker Desktop is running (check for the icon in your system tray)
- On Linux:
sudo systemctl status dockerto check if the service is active
-
GPU not detected
- Ensure NVIDIA drivers are up to date
- Verify NVIDIA Container Toolkit is properly installed:
nvidia-smi
- This command should display your GPU information
-
Permission issues with Docker
- Windows: Run Command Prompt as Administrator
- Linux: You may need to add your user to the docker group:
sudo usermod -aG docker $USER # Then log out and back in
-
Port already in use
- If port 7860 is already being used by another application, modify the port in docker-compose.yml
-
Not enough VRAM
- If you have less than 24GB VRAM, try using the tiling option in the UI
- Reduce the number of frames and inference steps
If you encounter issues, check the container logs:
docker compose logs- Enter a prompt describing the video you want to generate
- Upload a conditioning image
- Adjust the parameters as needed:
- Number of frames
- FPS (frames per second)
- Guidance scale
- Inference steps
- Seed value (-1 for random)
- Enable/disable tiling (helps with memory usage)
- Click "Generate Video"
- The generated video will be saved to the
outputdirectory
The Docker setup includes one volume mount:
./output:/app/output- For storing generated videos
All generated videos will be saved in the output directory in your project folder.
This setup includes specific optimizations for RTX 3090 GPUs with 24GB VRAM:
- Flash Attention 2 for efficient attention computation
- BFloat16 precision for optimal performance/memory balance
- VRAM management features to maximize available memory
- Xformers memory efficient attention when available
- Uses DiffSynth-Studio's WanVideoPipeline for video generation
- Employs Flash Attention 2 and torch.bfloat16 precision for RTX 3090 GPUs
- Optimizes VRAM usage with vram_management feature
- Generates videos based on text prompts and conditioning images