From ee170f17659d2750103773c91a766595d6393cf5 Mon Sep 17 00:00:00 2001 From: Ciprian Mandache Date: Wed, 9 Jul 2025 22:48:30 +0300 Subject: [PATCH 1/3] dockerize and add deb-based sys runner + builder --- Dockerfile | 92 +++++++++++++++++++++ README.md | 113 +++++++++++++++++++------ entrypoint.sh | 18 ++++ run-docker-cuda-deb.sh | 183 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 379 insertions(+), 27 deletions(-) create mode 100644 Dockerfile create mode 100755 entrypoint.sh create mode 100755 run-docker-cuda-deb.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..927c579 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,92 @@ +FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 + +# Build arg for GPU architectures - specify which CUDA compute capabilities to compile for +# Common values: +# 7.0 - Tesla V100 +# 7.5 - RTX 2060, 2070, 2080, Titan RTX +# 8.0 - A100, A800 (Ampere data center) +# 8.6 - RTX 3060, 3070, 3080, 3090 (Ampere consumer) +# 8.9 - RTX 4070, 4080, 4090 (Ada Lovelace) +# 9.0 - H100, H800 (Hopper data center) +# 12.0 - RTX 5070, 5080, 5090 (Blackwell) - Note: sm_120 architecture +# +# Examples: +# RTX 3060: --build-arg CUDA_ARCHITECTURES="8.6" +# RTX 4090: --build-arg CUDA_ARCHITECTURES="8.9" +# Multiple: --build-arg CUDA_ARCHITECTURES="8.0;8.6;8.9" +# +# Note: Including 8.9 or 9.0 may cause compilation issues on some setups +# Default includes 8.0 and 8.6 for broad Ampere compatibility +ARG CUDA_ARCHITECTURES="8.0;8.6" + +ENV DEBIAN_FRONTEND=noninteractive + +# Install system dependencies +RUN apt update && \ + apt install -y \ + python3 python3-pip git wget curl cmake ninja-build \ + libgl1 libglib2.0-0 ffmpeg && \ + apt clean + +WORKDIR /workspace + +COPY requirements.txt . + +# Upgrade pip first +RUN pip install --upgrade pip setuptools wheel + +# Install requirements if exists +RUN pip install -r requirements.txt + +# Install PyTorch with CUDA support +RUN pip install --extra-index-url https://download.pytorch.org/whl/cu124 \ + torch==2.6.0+cu124 torchvision==0.21.0+cu124 + +# Install SageAttention from git (patch GPU detection) +ENV TORCH_CUDA_ARCH_LIST="${CUDA_ARCHITECTURES}" +ENV FORCE_CUDA="1" +ENV MAX_JOBS="1" + +COPY < WanGP by DeepBeepMeep : The best Open Source Video Generative Models Accessible to the GPU Poor

WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models with: + - Low VRAM requirements (as low as 6 GB of VRAM is sufficient for certain models) - Support for old GPUs (RTX 10XX, 20xx, ...) - Very Fast on the latest GPUs @@ -13,40 +15,46 @@ WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models - Auto download of the required model adapted to your specific architecture - Tools integrated to facilitate Video Generation : Mask Editor, Prompt Enhancer, Temporal and Spatial Generation, MMAudio, Video Browser, Pose / Depth / Flow extractor - Loras Support to customize each model -- Queuing system : make your shopping list of videos to generate and come back later +- Queuing system : make your shopping list of videos to generate and come back later **Discord Server to get Help from Other Users and show your Best Videos:** https://discord.gg/g7efUW9jGV **Follow DeepBeepMeep on Twitter/X to get the Latest News**: https://x.com/deepbeepmeep ## πŸ”₯ Latest Updates + ### July 8 2025: WanGP v6.6, WanGP offers you **Vace Multitalk Dual Voices Fusionix Infinite** : -**Vace** our beloved super Control Net has been combined with **Multitalk** the new king in town that can animate up to two people speaking (**Dual Voices**). It is accelerated by the **Fusionix** model and thanks to *Sliding Windows* support and *Adaptive Projected Guidance* (much slower but should reduce the reddish effect with long videos) your two people will be able to talk for very a long time (which is an **Infinite** amount of time in the field of video generation). -Of course you will get as well *Multitalk* vanilla and also *Multitalk 720p* as a bonus. +**Vace** our beloved super Control Net has been combined with **Multitalk** the new king in town that can animate up to two people speaking (**Dual Voices**). It is accelerated by the **Fusionix** model and thanks to _Sliding Windows_ support and _Adaptive Projected Guidance_ (much slower but should reduce the reddish effect with long videos) your two people will be able to talk for very a long time (which is an **Infinite** amount of time in the field of video generation). -And since I am mister nice guy I have enclosed as an exclusivity an *Audio Separator* that will save you time to isolate each voice when using Multitalk with two people. +Of course you will get as well _Multitalk_ vanilla and also _Multitalk 720p_ as a bonus. -As I feel like resting a bit I haven't produced yet a nice sample Video to illustrate all these new capabilities. But here is the thing, I ams sure you will publish in the *Share Your Best Video* channel your *Master Pieces*. The best ones will be added to the *Announcements Channel* and will bring eternal fame to its authors. +And since I am mister nice guy I have enclosed as an exclusivity an _Audio Separator_ that will save you time to isolate each voice when using Multitalk with two people. + +As I feel like resting a bit I haven't produced yet a nice sample Video to illustrate all these new capabilities. But here is the thing, I ams sure you will publish in the _Share Your Best Video_ channel your _Master Pieces_. The best ones will be added to the _Announcements Channel_ and will bring eternal fame to its authors. But wait, there is more: + - Sliding Windows support has been added anywhere with Wan models, so imagine with text2video recently upgraded in 6.5 into a video2video, you can now upsample very long videos regardless of your VRAM. The good old image2video model can now reuse the last image to produce new videos (as requested by many of you) - I have added also the capability to transfer the audio of the original control video (Misc. advanced tab) and an option to preserve the fps into the generated video, so from now on you will be to upsample / restore your old families video and keep the audio at their original pace. Be aware that the duration will be limited to 1000 frames as I still need to add streaming support for unlimited video sizes. Also, of interest too: + - Extract video info from Videos that have not been generated by WanGP, even better you can also apply post processing (Upsampling / MMAudio) on non WanGP videos - Force the generated video fps to your liking, works wery well with Vace when using a Control Video - Ability to chain URLs of Finetune models (for instance put the URLs of a model in your main finetune and reference this finetune in other finetune models to save time) ### July 2 2025: WanGP v6.5.1, WanGP takes care of you: lots of quality of life features: + - View directly inside WanGP the properties (seed, resolutions, length, most settings...) of the past generations -- In one click use the newly generated video as a Control Video or Source Video to be continued -- Manage multiple settings for the same model and switch between them using a dropdown box +- In one click use the newly generated video as a Control Video or Source Video to be continued +- Manage multiple settings for the same model and switch between them using a dropdown box - WanGP will keep the last generated videos in the Gallery and will remember the last model you used if you restart the app but kept the Web page open - Custom resolutions : add a file in the WanGP folder with the list of resolutions you want to see in WanGP (look at the instruction readme in this folder) Taking care of your life is not enough, you want new stuff to play with ? -- MMAudio directly inside WanGP : add an audio soundtrack that matches the content of your video. By the way it is a low VRAM MMAudio and 6 GB of VRAM should be sufficient. You will need to go in the *Extensions* tab of the WanGP *Configuration* to enable MMAudio + +- MMAudio directly inside WanGP : add an audio soundtrack that matches the content of your video. By the way it is a low VRAM MMAudio and 6 GB of VRAM should be sufficient. You will need to go in the _Extensions_ tab of the WanGP _Configuration_ to enable MMAudio - Forgot to upsample your video during the generation ? want to try another MMAudio variation ? Fear not you can also apply upsampling or add an MMAudio track once the video generation is done. Even better you can ask WangGP for multiple variations of MMAudio to pick the one you like best - MagCache support: a new step skipping approach, supposed to be better than TeaCache. Makes a difference if you usually generate with a high number of steps - SageAttention2++ support : not just the compatibility but also a slightly reduced VRAM usage @@ -58,24 +66,29 @@ Taking care of your life is not enough, you want new stuff to play with ? **If you had upgraded to v6.5 please upgrade again to 6.5.1 as this will fix a bug that ignored Loras beyond the first one** ### June 23 2025: WanGP v6.3, Vace Unleashed. Thought we couldnt squeeze Vace even more ? + - Multithreaded preprocessing when possible for faster generations - Multithreaded frames Lanczos Upsampling as a bonus -- A new Vace preprocessor : *Flow* to extract fluid motion -- Multi Vace Controlnets: you can now transfer several properties at the same time. This opens new possibilities to explore, for instance if you transfer *Human Movement* and *Shapes* at the same time for some reasons the lighting of your character will take into account much more the environment of your character. +- A new Vace preprocessor : _Flow_ to extract fluid motion +- Multi Vace Controlnets: you can now transfer several properties at the same time. This opens new possibilities to explore, for instance if you transfer _Human Movement_ and _Shapes_ at the same time for some reasons the lighting of your character will take into account much more the environment of your character. - Injected Frames Outpainting, in case you missed it in WanGP 6.21 Don't know how to use all of the Vace features ? Check the Vace Guide embedded in WanGP as it has also been updated. - ### June 19 2025: WanGP v6.2, Vace even more Powercharged -πŸ‘‹ Have I told you that I am a big fan of Vace ? Here are more goodies to unleash its power: -- If you ever wanted to watch Star Wars in 4:3, just use the new *Outpainting* feature and it will add the missing bits of image at the top and the bottom of the screen. The best thing is *Outpainting* can be combined with all the other Vace modifications, for instance you can change the main character of your favorite movie at the same time -- More processing can combined at the same time (for instance the depth process can be applied outside the mask) + +πŸ‘‹ Have I told you that I am a big fan of Vace ? Here are more goodies to unleash its power: + +- If you ever wanted to watch Star Wars in 4:3, just use the new _Outpainting_ feature and it will add the missing bits of image at the top and the bottom of the screen. The best thing is _Outpainting_ can be combined with all the other Vace modifications, for instance you can change the main character of your favorite movie at the same time +- More processing can combined at the same time (for instance the depth process can be applied outside the mask) - Upgraded the depth extractor to Depth Anything 2 which is much more detailed -As a bonus, I have added two finetunes based on the Safe-Forcing technology (which requires only 4 steps to generate a video): Wan 2.1 text2video Self-Forcing and Vace Self-Forcing. I know there is Lora around but the quality of the Lora is worse (at least with Vace) compared to the full model. Don't hesitate to share your opinion about this on the discord server. +As a bonus, I have added two finetunes based on the Safe-Forcing technology (which requires only 4 steps to generate a video): Wan 2.1 text2video Self-Forcing and Vace Self-Forcing. I know there is Lora around but the quality of the Lora is worse (at least with Vace) compared to the full model. Don't hesitate to share your opinion about this on the discord server. + ### June 17 2025: WanGP v6.1, Vace Powercharged + πŸ‘‹ Lots of improvements for Vace the Mother of all Models: + - masks can now be combined with on the fly processing of a control video, for instance you can extract the motion of a specific person defined by a mask - on the fly modification of masks : reversed masks (with the same mask you can modify the background instead of the people covered by the masks), enlarged masks (you can cover more area if for instance the person you are trying to inject is larger than the one in the mask), ... - view these modified masks directly inside WanGP during the video generation to check they are really as expected @@ -87,52 +100,62 @@ Of course all these new stuff work on all Vace finetunes (including Vace Fusioni Thanks also to Reevoy24 for adding a Notfication sound at the end of a generation and for fixing the background color of the current generation summary. ### June 12 2025: WanGP v6.0 -πŸ‘‹ *Finetune models*: You find the 20 models supported by WanGP not sufficient ? Too impatient to wait for the next release to get the support for a newly released model ? Your prayers have been answered: if a new model is compatible with a model architecture supported by WanGP, you can add by yourself the support for this model in WanGP by just creating a finetune model definition. You can then store this model in the cloud (for instance in Huggingface) and the very light finetune definition file can be easily shared with other users. WanGP will download automatically the finetuned model for them. + +πŸ‘‹ _Finetune models_: You find the 20 models supported by WanGP not sufficient ? Too impatient to wait for the next release to get the support for a newly released model ? Your prayers have been answered: if a new model is compatible with a model architecture supported by WanGP, you can add by yourself the support for this model in WanGP by just creating a finetune model definition. You can then store this model in the cloud (for instance in Huggingface) and the very light finetune definition file can be easily shared with other users. WanGP will download automatically the finetuned model for them. To celebrate the new finetunes support, here are a few finetune gifts (directly accessible from the model selection menu): -- *Fast Hunyuan Video* : generate model t2v in only 6 steps -- *Hunyuan Vido AccVideo* : generate model t2v in only 5 steps -- *Wan FusioniX*: it is a combo of AccVideo / CausVid ans other models and can generate high quality Wan videos in only 8 steps + +- _Fast Hunyuan Video_ : generate model t2v in only 6 steps +- _Hunyuan Vido AccVideo_ : generate model t2v in only 5 steps +- _Wan FusioniX_: it is a combo of AccVideo / CausVid ans other models and can generate high quality Wan videos in only 8 steps One more thing... -The new finetune system can be used to combine complementaty models : what happens when you combine Fusionix Text2Video and Vace Control Net ? +The new finetune system can be used to combine complementaty models : what happens when you combine Fusionix Text2Video and Vace Control Net ? You get **Vace FusioniX**: the Ultimate Vace Model, Fast (10 steps, no need for guidance) and with a much better quality Video than the original slower model (despite being the best Control Net out there). Here goes one more finetune... -Check the *Finetune Guide* to create finetune models definitions and share them on the WanGP discord server. +Check the _Finetune Guide_ to create finetune models definitions and share them on the WanGP discord server. ### June 11 2025: WanGP v5.5 -πŸ‘‹ *Hunyuan Video Custom Audio*: it is similar to Hunyuan Video Avatar except there isn't any lower limit on the number of frames and you can use your reference images in a different context than the image itself\ -*Hunyuan Video Custom Edit*: Hunyuan Video Controlnet, use it to do inpainting and replace a person in a video while still keeping his poses. Similar to Vace but less restricted than the Wan models in terms of content... +πŸ‘‹ _Hunyuan Video Custom Audio_: it is similar to Hunyuan Video Avatar except there isn't any lower limit on the number of frames and you can use your reference images in a different context than the image itself\ +_Hunyuan Video Custom Edit_: Hunyuan Video Controlnet, use it to do inpainting and replace a person in a video while still keeping his poses. Similar to Vace but less restricted than the Wan models in terms of content... ### June 6 2025: WanGP v5.41 + πŸ‘‹ Bonus release: Support for **AccVideo** Lora to speed up x2 Video generations in Wan models. Check the Loras documentation to get the usage instructions of AccVideo.\ -You will need to do a *pip install -r requirements.txt* +You will need to do a _pip install -r requirements.txt_ ### June 6 2025: WanGP v5.4 + πŸ‘‹ World Exclusive : **Hunyuan Video Avatar** Support ! You won't need 80 GB of VRAM nor 32 GB oF VRAM, just 10 GB of VRAM will be sufficient to generate up to 15s of high quality speech / song driven Video at a high speed with no quality degradation. Support for TeaCache included.\ Here is a link to the original repo where you will find some very interesting documentation and examples. https://github.com/Tencent-Hunyuan/HunyuanVideo-Avatar. Kudos to the Hunyuan Video Avatar team for the best model of its kind.\ Also many thanks to Reevoy24 for his repackaging / completing the documentation ### May 28 2025: WanGP v5.31 + πŸ‘‹ Added **Phantom 14B**, a model that you can use to transfer objects / people in the video. My preference goes to Vace that remains the king of controlnets. VACE improvements: Better sliding window transitions, image mask support in Matanyone, new Extend Video feature, and enhanced background removal options. ### May 26, 2025: WanGP v5.3 + πŸ‘‹ Settings management revolution! Now you can: -- Select any generated video and click *Use Selected Video Settings* to instantly reuse its configuration + +- Select any generated video and click _Use Selected Video Settings_ to instantly reuse its configuration - Drag & drop videos to automatically extract their settings metadata - Export/import settings as JSON files for easy sharing and backup ### May 20, 2025: WanGP v5.2 + πŸ‘‹ **CausVid support** - Generate videos in just 4-12 steps with the new distilled Wan model! Also added experimental MoviiGen for 1080p generation (20GB+ VRAM required). Check the Loras documentation to get the usage instructions of CausVid. ### May 18, 2025: WanGP v5.1 + πŸ‘‹ **LTX Video 13B Distilled** - Generate high-quality videos in less than one minute! ### May 17, 2025: WanGP v5.0 + πŸ‘‹ **One App to Rule Them All!** Added Hunyuan Video and LTX Video support, plus Vace 14B and integrated prompt enhancer. See full changelog: **[Changelog](docs/CHANGELOG.md)** @@ -150,6 +173,7 @@ See full changelog: **[Changelog](docs/CHANGELOG.md)** **One-click installation:** Get started instantly with [Pinokio App](https://pinokio.computer/) **Manual installation:** + ```bash git clone https://github.com/deepbeepmeep/Wan2GP.git cd Wan2GP @@ -160,6 +184,7 @@ pip install -r requirements.txt ``` **Run the application:** + ```bash python wgp.py # Text-to-video (default) python wgp.py --i2v # Image-to-video @@ -168,6 +193,7 @@ python wgp.py --i2v # Image-to-video **Update the application:** If using Pinokio use Pinokio to update otherwise: Get in the directory where WanGP is installed and: + ```bash git pull pip install -r requirements.txt @@ -175,16 +201,48 @@ pip install -r requirements.txt ## πŸ“¦ Installation +### 🐳 Docker Installation + +**For Debian-based systems (Ubuntu, Debian, etc.):** + +```bash +./run-docker-cuda-deb.sh +``` + +This automated script will: + +- Detect your GPU model and VRAM automatically +- Select optimal CUDA architecture for your GPU +- Install NVIDIA Docker runtime if needed +- Build a Docker image with all dependencies +- Run WanGP with optimal settings for your hardware + +**Docker environment includes:** + +- NVIDIA CUDA 12.4.1 with cuDNN support +- PyTorch 2.6.0 with CUDA 12.4 support +- SageAttention compiled for your specific GPU architecture +- Optimized environment variables for performance (TF32, threading, etc.) +- Automatic cache directory mounting for faster subsequent runs +- Current directory mounted in container - all downloaded models, loras, generated videos and files are saved locally + +**Supported GPUs:** RTX 50XX, RTX 40XX, RTX 30XX, RTX 20XX, GTX 16XX, GTX 10XX, Tesla V100, A100, H100, and more. + +### Manual Installation + For detailed installation instructions for different GPU generations: + - **[Installation Guide](docs/INSTALLATION.md)** - Complete setup instructions for RTX 10XX to RTX 50XX ## 🎯 Usage ### Basic Usage + - **[Getting Started Guide](docs/GETTING_STARTED.md)** - First steps and basic usage - **[Models Overview](docs/MODELS.md)** - Available models and their capabilities ### Advanced Features + - **[Loras Guide](docs/LORAS.md)** - Using and managing Loras for customization - **[Finetunes](docs/FINETUNES.md)** - Add manually new models to WanGP - **[VACE ControlNet](docs/VACE.md)** - Advanced video control and manipulation @@ -198,6 +256,7 @@ For detailed installation instructions for different GPU generations: ## πŸ”— Related Projects ### Other Models for the GPU Poor + - **[HuanyuanVideoGP](https://github.com/deepbeepmeep/HunyuanVideoGP)** - One of the best open source Text to Video generators - **[Hunyuan3D-2GP](https://github.com/deepbeepmeep/Hunyuan3D-2GP)** - Image to 3D and text to 3D tool - **[FluxFillGP](https://github.com/deepbeepmeep/FluxFillGP)** - Inpainting/outpainting tools based on Flux @@ -209,4 +268,4 @@ For detailed installation instructions for different GPU generations:

Made with ❀️ by DeepBeepMeep -

+

diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..4c363ab --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +export HOME=/home/user +export PYTHONUNBUFFERED=1 +export HF_HOME=/home/user/.cache/huggingface + +export OMP_NUM_THREADS=$(nproc) +export MKL_NUM_THREADS=$(nproc) +export OPENBLAS_NUM_THREADS=$(nproc) +export NUMEXPR_NUM_THREADS=$(nproc) + +export TORCH_ALLOW_TF32_CUBLAS=1 +export TORCH_ALLOW_TF32_CUDNN=1 + +# Disable audio warnings in Docker +export SDL_AUDIODRIVER=dummy +export PULSE_RUNTIME_PATH=/tmp/pulse-runtime + +exec su -p user -c "python3 wgp.py --listen $*" diff --git a/run-docker-cuda-deb.sh b/run-docker-cuda-deb.sh new file mode 100755 index 0000000..1a6201a --- /dev/null +++ b/run-docker-cuda-deb.sh @@ -0,0 +1,183 @@ +#!/usr/bin/env bash +set -euo pipefail + +# ───────────────────────── helpers ───────────────────────── + +install_nvidia_smi_if_missing() { + if command -v nvidia-smi &>/dev/null; then + return + fi + + echo "⚠️ nvidia-smi not found. Installing nvidia-utils…" + if [ "$EUID" -ne 0 ]; then + SUDO='sudo' + else + SUDO='' + fi + + $SUDO apt-get update + $SUDO apt-get install -y nvidia-utils-535 || $SUDO apt-get install -y nvidia-utils + + if ! command -v nvidia-smi &>/dev/null; then + echo "❌ Failed to install nvidia-smi. Cannot detect GPU architecture." + exit 1 + fi + echo "βœ… nvidia-smi installed successfully." +} + +detect_gpu_name() { + install_nvidia_smi_if_missing + nvidia-smi --query-gpu=name --format=csv,noheader,nounits | head -1 +} + +map_gpu_to_arch() { + local name="$1" + case "$name" in + *"RTX 50"* | *"5090"* | *"5080"* | *"5070"*) echo "12.0" ;; + *"H100"* | *"H800"*) echo "9.0" ;; + *"RTX 40"* | *"4090"* | *"4080"* | *"4070"* | *"4060"*) echo "8.9" ;; + *"RTX 30"* | *"3090"* | *"3080"* | *"3070"* | *"3060"*) echo "8.6" ;; + *"A100"* | *"A800"* | *"A40"*) echo "8.0" ;; + *"Tesla V100"*) echo "7.0" ;; + *"RTX 20"* | *"2080"* | *"2070"* | *"2060"* | *"Titan RTX"*) echo "7.5" ;; + *"GTX 16"* | *"1660"* | *"1650"*) echo "7.5" ;; + *"GTX 10"* | *"1080"* | *"1070"* | *"1060"* | *"Tesla P100"*) echo "6.1" ;; + *"Tesla K80"* | *"Tesla K40"*) echo "3.7" ;; + *) + echo "❌ Unknown GPU model: $name" + echo "Please update the map_gpu_to_arch function for this model." + exit 1 + ;; + esac +} + +get_gpu_vram() { + install_nvidia_smi_if_missing + # Get VRAM in MB, convert to GB + local vram_mb=$(nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits | head -1) + echo $((vram_mb / 1024)) +} + +map_gpu_to_profile() { + local name="$1" + local vram_gb="$2" + + # WanGP Profile descriptions from the actual UI: + # Profile 1: HighRAM_HighVRAM - 48GB+ RAM, 24GB+ VRAM (fastest for short videos, RTX 3090/4090) + # Profile 2: HighRAM_LowVRAM - 48GB+ RAM, 12GB+ VRAM (recommended, most versatile) + # Profile 3: LowRAM_HighVRAM - 32GB+ RAM, 24GB+ VRAM (RTX 3090/4090 with limited RAM) + # Profile 4: LowRAM_LowVRAM - 32GB+ RAM, 12GB+ VRAM (default, little VRAM or longer videos) + # Profile 5: VerylowRAM_LowVRAM - 16GB+ RAM, 10GB+ VRAM (fail safe, slow but works) + + case "$name" in + # High-end data center GPUs with 24GB+ VRAM - Profile 1 (HighRAM_HighVRAM) + *"RTX 50"* | *"5090"* | *"A100"* | *"A800"* | *"H100"* | *"H800"*) + if [ "$vram_gb" -ge 24 ]; then + echo "1" # HighRAM_HighVRAM - fastest for short videos + else + echo "2" # HighRAM_LowVRAM - most versatile + fi + ;; + # High-end consumer GPUs (RTX 3090/4090) - Profile 1 or 3 + *"RTX 40"* | *"4090"* | *"RTX 30"* | *"3090"*) + if [ "$vram_gb" -ge 24 ]; then + echo "3" # LowRAM_HighVRAM - good for limited RAM systems + else + echo "2" # HighRAM_LowVRAM - most versatile + fi + ;; + # Mid-range GPUs (RTX 3070/3080/4070/4080) - Profile 2 recommended + *"4080"* | *"4070"* | *"3080"* | *"3070"* | *"RTX 20"* | *"2080"* | *"2070"*) + if [ "$vram_gb" -ge 12 ]; then + echo "2" # HighRAM_LowVRAM - recommended for these GPUs + else + echo "4" # LowRAM_LowVRAM - default for little VRAM + fi + ;; + # Lower-end GPUs with 6-12GB VRAM - Profile 4 or 5 + *"4060"* | *"3060"* | *"2060"* | *"GTX 16"* | *"1660"* | *"1650"*) + if [ "$vram_gb" -ge 10 ]; then + echo "4" # LowRAM_LowVRAM - default + else + echo "5" # VerylowRAM_LowVRAM - fail safe + fi + ;; + # Older/lower VRAM GPUs - Profile 5 (fail safe) + *"GTX 10"* | *"1080"* | *"1070"* | *"1060"* | *"Tesla"*) + echo "5" # VerylowRAM_LowVRAM - fail safe + ;; + *) + echo "4" # LowRAM_LowVRAM - default fallback + ;; + esac +} + +# ───────────────────────── main ──────────────────────────── + +GPU_NAME=$(detect_gpu_name) +echo "πŸ” Detected GPU: $GPU_NAME" + +VRAM_GB=$(get_gpu_vram) +echo "🧠 Detected VRAM: ${VRAM_GB}GB" + +CUDA_ARCH=$(map_gpu_to_arch "$GPU_NAME") +echo "πŸš€ Using CUDA architecture: $CUDA_ARCH" + +PROFILE=$(map_gpu_to_profile "$GPU_NAME" "$VRAM_GB") +echo "βš™οΈ Selected profile: $PROFILE" + +docker build --build-arg CUDA_ARCHITECTURES="$CUDA_ARCH" -t deepbeepmeep/wan2gp . + +# sudo helper for later commands +if [ "$EUID" -ne 0 ]; then + SUDO='sudo' +else + SUDO='' +fi + +# Ensure NVIDIA runtime is available +if ! docker info 2>/dev/null | grep -q 'Runtimes:.*nvidia'; then + echo "⚠️ NVIDIA Docker runtime not found. Installing nvidia-docker2…" + $SUDO apt-get update + $SUDO apt-get install -y curl ca-certificates gnupg + curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | $SUDO apt-key add - + distribution=$( + . /etc/os-release + echo $ID$VERSION_ID + ) + curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | + $SUDO tee /etc/apt/sources.list.d/nvidia-docker.list + $SUDO apt-get update + $SUDO apt-get install -y nvidia-docker2 + echo "πŸ”„ Restarting Docker service…" + $SUDO systemctl restart docker + echo "βœ… NVIDIA Docker runtime installed." +else + echo "βœ… NVIDIA Docker runtime found." +fi + +# Prepare cache dirs & volume mounts +cache_dirs=(numba matplotlib huggingface torch) +cache_mounts=() +for d in "${cache_dirs[@]}"; do + mkdir -p "$HOME/.cache/$d" + chmod 700 "$HOME/.cache/$d" + cache_mounts+=(-v "$HOME/.cache/$d:/home/user/.cache/$d") +done + +echo "πŸ”§ Optimization settings:" +echo " Profile: $PROFILE" + +# Run the container +docker run --rm -it \ + --name wan2gp \ + --gpus all \ + --runtime=nvidia \ + -p 7860:7860 \ + -v "$(pwd):/workspace" \ + "${cache_mounts[@]}" \ + deepbeepmeep/wan2gp \ + --profile "$PROFILE" \ + --attention sage \ + --compile \ + --perc-reserved-mem-max 1 From 3307defa7c005e8566170d0784254aa9829a1759 Mon Sep 17 00:00:00 2001 From: Ciprian Mandache Date: Sat, 30 Aug 2025 06:51:17 +0300 Subject: [PATCH 2/3] add more checks + logging + upgrade peft --- entrypoint.sh | 100 +++++++++++++++++++++++++++++++++++++++++ requirements.txt | 8 ++-- run-docker-cuda-deb.sh | 27 +++++++++++ 3 files changed, 131 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 4c363ab..9af052d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,4 +15,104 @@ export TORCH_ALLOW_TF32_CUDNN=1 export SDL_AUDIODRIVER=dummy export PULSE_RUNTIME_PATH=/tmp/pulse-runtime +# ═══════════════════════════ CUDA DEBUG CHECKS ═══════════════════════════ + +echo "πŸ” CUDA Environment Debug Information:" +echo "═══════════════════════════════════════════════════════════════════════" + +# Check CUDA driver on host (if accessible) +if command -v nvidia-smi >/dev/null 2>&1; then + echo "βœ… nvidia-smi available" + echo "πŸ“Š GPU Information:" + nvidia-smi --query-gpu=name,driver_version,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null || echo "❌ nvidia-smi failed to query GPU" + echo "πŸƒ Running Processes:" + nvidia-smi --query-compute-apps=pid,name,used_memory --format=csv,noheader,nounits 2>/dev/null || echo "ℹ️ No running CUDA processes" +else + echo "❌ nvidia-smi not available in container" +fi + +# Check CUDA runtime libraries +echo "" +echo "πŸ”§ CUDA Runtime Check:" +if ls /usr/local/cuda*/lib*/libcudart.so* >/dev/null 2>&1; then + echo "βœ… CUDA runtime libraries found:" + ls /usr/local/cuda*/lib*/libcudart.so* 2>/dev/null +else + echo "❌ CUDA runtime libraries not found" +fi + +# Check CUDA devices +echo "" +echo "πŸ–₯️ CUDA Device Files:" +if ls /dev/nvidia* >/dev/null 2>&1; then + echo "βœ… NVIDIA device files found:" + ls -la /dev/nvidia* 2>/dev/null +else + echo "❌ No NVIDIA device files found - Docker may not have GPU access" +fi + +# Check CUDA environment variables +echo "" +echo "🌍 CUDA Environment Variables:" +echo " CUDA_HOME: ${CUDA_HOME:-not set}" +echo " CUDA_ROOT: ${CUDA_ROOT:-not set}" +echo " CUDA_PATH: ${CUDA_PATH:-not set}" +echo " LD_LIBRARY_PATH: ${LD_LIBRARY_PATH:-not set}" +echo " TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST:-not set}" +echo " CUDA_VISIBLE_DEVICES: ${CUDA_VISIBLE_DEVICES:-not set}" + +# Check PyTorch CUDA availability +echo "" +echo "🐍 PyTorch CUDA Check:" +python3 -c " +import sys +try: + import torch + print('βœ… PyTorch imported successfully') + print(f' Version: {torch.__version__}') + print(f' CUDA available: {torch.cuda.is_available()}') + if torch.cuda.is_available(): + print(f' CUDA version: {torch.version.cuda}') + print(f' cuDNN version: {torch.backends.cudnn.version()}') + print(f' Device count: {torch.cuda.device_count()}') + for i in range(torch.cuda.device_count()): + props = torch.cuda.get_device_properties(i) + print(f' Device {i}: {props.name} (SM {props.major}.{props.minor}, {props.total_memory//1024//1024}MB)') + else: + print('❌ CUDA not available to PyTorch') + print(' This could mean:') + print(' - CUDA runtime not properly installed') + print(' - GPU not accessible to container') + print(' - Driver/runtime version mismatch') +except ImportError as e: + print(f'❌ Failed to import PyTorch: {e}') +except Exception as e: + print(f'❌ PyTorch CUDA check failed: {e}') +" 2>&1 + +# Check for common CUDA issues +echo "" +echo "🩺 Common Issue Diagnostics:" + +# Check if running with proper Docker flags +if [ ! -e /dev/nvidia0 ] && [ ! -e /dev/nvidiactl ]; then + echo "❌ No NVIDIA device nodes - container likely missing --gpus all or --runtime=nvidia" +fi + +# Check CUDA library paths +if [ -z "$LD_LIBRARY_PATH" ] || ! echo "$LD_LIBRARY_PATH" | grep -q cuda; then + echo "⚠️ LD_LIBRARY_PATH may not include CUDA libraries" +fi + +# Check permissions on device files +if ls /dev/nvidia* >/dev/null 2>&1; then + if ! ls -la /dev/nvidia* | grep -q "rw-rw-rw-\|rw-r--r--"; then + echo "⚠️ NVIDIA device files may have restrictive permissions" + fi +fi + +echo "═══════════════════════════════════════════════════════════════════════" +echo "πŸš€ Starting application..." +echo "" + exec su -p user -c "python3 wgp.py --listen $*" diff --git a/requirements.txt b/requirements.txt index ea0c582..312dc94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,13 +12,13 @@ easydict ftfy dashscope imageio-ffmpeg -# flash_attn -gradio==5.23.0 +# flash_attn +gradio==5.23.0 numpy>=1.23.5,<2 einops moviepy==1.0.3 mmgp==3.5.1 -peft==0.15.0 +peft==0.17.0 mutagen pydantic==2.10.6 decord @@ -46,4 +46,4 @@ soundfile ffmpeg-python pyannote.audio # num2words -# spacy \ No newline at end of file +# spacy diff --git a/run-docker-cuda-deb.sh b/run-docker-cuda-deb.sh index 1a6201a..b35e9cc 100755 --- a/run-docker-cuda-deb.sh +++ b/run-docker-cuda-deb.sh @@ -114,6 +114,25 @@ map_gpu_to_profile() { # ───────────────────────── main ──────────────────────────── +echo "πŸ”§ NVIDIA CUDA Setup Check:" + +# NVIDIA driver check +if command -v nvidia-smi &>/dev/null; then + DRIVER_VERSION=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader,nounits | head -1) + echo "βœ… NVIDIA Driver: $DRIVER_VERSION" + + # Quick CUDA 12.4 compatibility check + if [[ "$DRIVER_VERSION" =~ ^([0-9]+) ]]; then + MAJOR=${BASH_REMATCH[1]} + if [ "$MAJOR" -lt 520 ]; then + echo "⚠️ Driver $DRIVER_VERSION may not support CUDA 12.4 (need 520+)" + fi + fi +else + echo "❌ nvidia-smi not found - no NVIDIA drivers" + exit 1 +fi + GPU_NAME=$(detect_gpu_name) echo "πŸ” Detected GPU: $GPU_NAME" @@ -156,6 +175,14 @@ else echo "βœ… NVIDIA Docker runtime found." fi +# Quick NVIDIA runtime test +echo "πŸ§ͺ Testing NVIDIA runtime..." +if timeout 15s docker run --rm --gpus all --runtime=nvidia nvidia/cuda:12.4-runtime-ubuntu22.04 nvidia-smi >/dev/null 2>&1; then + echo "βœ… NVIDIA runtime working" +else + echo "❌ NVIDIA runtime test failed - check driver/runtime compatibility" +fi + # Prepare cache dirs & volume mounts cache_dirs=(numba matplotlib huggingface torch) cache_mounts=() From 808ef51688dfd30288c3a99f369448d0e76b9a1f Mon Sep 17 00:00:00 2001 From: Ciprian Mandache Date: Sat, 30 Aug 2025 07:02:35 +0300 Subject: [PATCH 3/3] fix readme --- README.md | 135 ++++++++++++++++++++---------------------------------- 1 file changed, 50 insertions(+), 85 deletions(-) diff --git a/README.md b/README.md index 50c03ee..fb04ce1 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # WanGP ---- - +-----

WanGP by DeepBeepMeep : The best Open Source Video Generative Models Accessible to the GPU Poor

WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models with: - - Low VRAM requirements (as low as 6 GB of VRAM is sufficient for certain models) - Support for old GPUs (RTX 10XX, 20xx, ...) - Very Fast on the latest GPUs @@ -45,39 +43,31 @@ Also in the news: ### July 10 2025: WanGP v6.7, is NAG a game changer ? you tell me Maybe you knew that already but most *Loras accelerators* we use today (Causvid, FusioniX) don't use *Guidance* at all (that it is *CFG* is set to 1). This helps to get much faster generations but the downside is that *Negative Prompts* are completely ignored (including the default ones set by the models). **NAG** (https://github.com/ChenDarYen/Normalized-Attention-Guidance) aims to solve that by injecting the *Negative Prompt* during the *attention* processing phase. -### July 10 2025: WanGP v6.7, is NAG a game changer ? you tell me - -Maybe you knew that already but most _Loras accelerators_ we use today (Causvid, FusioniX) don't use _Guidance_ at all (that it is _CFG_ is set to 1). This helps to get much faster generations but the downside is that _Negative Prompts_ are completely ignored (including the default ones set by the models). **NAG** (https://github.com/ChenDarYen/Normalized-Attention-Guidance) aims to solve that by injecting the _Negative Prompt_ during the _attention_ processing phase. - -So WanGP 6.7 gives you NAG, but not any NAG, a _Low VRAM_ implementation, the default one ends being VRAM greedy. You will find NAG in the _General_ advanced tab for most Wan models. +So WanGP 6.7 gives you NAG, but not any NAG, a *Low VRAM* implementation, the default one ends being VRAM greedy. You will find NAG in the *General* advanced tab for most Wan models. Use NAG especially when Guidance is set to 1. To turn it on set the **NAG scale** to something around 10. There are other NAG parameters **NAG tau** and **NAG alpha** which I recommend to change only if you don't get good results by just playing with the NAG scale. Don't hesitate to share on this discord server the best combinations for these 3 parameters. The authors of NAG claim that NAG can also be used when using a Guidance (CFG > 1) and to improve the prompt adherence. ### July 8 2025: WanGP v6.6, WanGP offers you **Vace Multitalk Dual Voices Fusionix Infinite** : +**Vace** our beloved super Control Net has been combined with **Multitalk** the new king in town that can animate up to two people speaking (**Dual Voices**). It is accelerated by the **Fusionix** model and thanks to *Sliding Windows* support and *Adaptive Projected Guidance* (much slower but should reduce the reddish effect with long videos) your two people will be able to talk for very a long time (which is an **Infinite** amount of time in the field of video generation). -**Vace** our beloved super Control Net has been combined with **Multitalk** the new king in town that can animate up to two people speaking (**Dual Voices**). It is accelerated by the **Fusionix** model and thanks to _Sliding Windows_ support and _Adaptive Projected Guidance_ (much slower but should reduce the reddish effect with long videos) your two people will be able to talk for very a long time (which is an **Infinite** amount of time in the field of video generation). +Of course you will get as well *Multitalk* vanilla and also *Multitalk 720p* as a bonus. -Of course you will get as well _Multitalk_ vanilla and also _Multitalk 720p_ as a bonus. +And since I am mister nice guy I have enclosed as an exclusivity an *Audio Separator* that will save you time to isolate each voice when using Multitalk with two people. -And since I am mister nice guy I have enclosed as an exclusivity an _Audio Separator_ that will save you time to isolate each voice when using Multitalk with two people. - -As I feel like resting a bit I haven't produced yet a nice sample Video to illustrate all these new capabilities. But here is the thing, I ams sure you will publish in the _Share Your Best Video_ channel your _Master Pieces_. The best ones will be added to the _Announcements Channel_ and will bring eternal fame to its authors. +As I feel like resting a bit I haven't produced yet a nice sample Video to illustrate all these new capabilities. But here is the thing, I ams sure you will publish in the *Share Your Best Video* channel your *Master Pieces*. The best ones will be added to the *Announcements Channel* and will bring eternal fame to its authors. But wait, there is more: - - Sliding Windows support has been added anywhere with Wan models, so imagine with text2video recently upgraded in 6.5 into a video2video, you can now upsample very long videos regardless of your VRAM. The good old image2video model can now reuse the last image to produce new videos (as requested by many of you) - I have added also the capability to transfer the audio of the original control video (Misc. advanced tab) and an option to preserve the fps into the generated video, so from now on you will be to upsample / restore your old families video and keep the audio at their original pace. Be aware that the duration will be limited to 1000 frames as I still need to add streaming support for unlimited video sizes. Also, of interest too: - - Extract video info from Videos that have not been generated by WanGP, even better you can also apply post processing (Upsampling / MMAudio) on non WanGP videos - Force the generated video fps to your liking, works wery well with Vace when using a Control Video - Ability to chain URLs of Finetune models (for instance put the URLs of a model in your main finetune and reference this finetune in other finetune models to save time) ### July 2 2025: WanGP v6.5.1, WanGP takes care of you: lots of quality of life features: - - View directly inside WanGP the properties (seed, resolutions, length, most settings...) of the past generations - In one click use the newly generated video as a Control Video or Source Video to be continued - Manage multiple settings for the same model and switch between them using a dropdown box @@ -85,8 +75,7 @@ Also, of interest too: - Custom resolutions : add a file in the WanGP folder with the list of resolutions you want to see in WanGP (look at the instruction readme in this folder) Taking care of your life is not enough, you want new stuff to play with ? - -- MMAudio directly inside WanGP : add an audio soundtrack that matches the content of your video. By the way it is a low VRAM MMAudio and 6 GB of VRAM should be sufficient. You will need to go in the _Extensions_ tab of the WanGP _Configuration_ to enable MMAudio +- MMAudio directly inside WanGP : add an audio soundtrack that matches the content of your video. By the way it is a low VRAM MMAudio and 6 GB of VRAM should be sufficient. You will need to go in the *Extensions* tab of the WanGP *Configuration* to enable MMAudio - Forgot to upsample your video during the generation ? want to try another MMAudio variation ? Fear not you can also apply upsampling or add an MMAudio track once the video generation is done. Even better you can ask WangGP for multiple variations of MMAudio to pick the one you like best - MagCache support: a new step skipping approach, supposed to be better than TeaCache. Makes a difference if you usually generate with a high number of steps - SageAttention2++ support : not just the compatibility but also a slightly reduced VRAM usage @@ -98,29 +87,24 @@ Taking care of your life is not enough, you want new stuff to play with ? **If you had upgraded to v6.5 please upgrade again to 6.5.1 as this will fix a bug that ignored Loras beyond the first one** ### June 23 2025: WanGP v6.3, Vace Unleashed. Thought we couldnt squeeze Vace even more ? - - Multithreaded preprocessing when possible for faster generations - Multithreaded frames Lanczos Upsampling as a bonus -- A new Vace preprocessor : _Flow_ to extract fluid motion -- Multi Vace Controlnets: you can now transfer several properties at the same time. This opens new possibilities to explore, for instance if you transfer _Human Movement_ and _Shapes_ at the same time for some reasons the lighting of your character will take into account much more the environment of your character. +- A new Vace preprocessor : *Flow* to extract fluid motion +- Multi Vace Controlnets: you can now transfer several properties at the same time. This opens new possibilities to explore, for instance if you transfer *Human Movement* and *Shapes* at the same time for some reasons the lighting of your character will take into account much more the environment of your character. - Injected Frames Outpainting, in case you missed it in WanGP 6.21 Don't know how to use all of the Vace features ? Check the Vace Guide embedded in WanGP as it has also been updated. + ### June 19 2025: WanGP v6.2, Vace even more Powercharged - πŸ‘‹ Have I told you that I am a big fan of Vace ? Here are more goodies to unleash its power: - -- If you ever wanted to watch Star Wars in 4:3, just use the new _Outpainting_ feature and it will add the missing bits of image at the top and the bottom of the screen. The best thing is _Outpainting_ can be combined with all the other Vace modifications, for instance you can change the main character of your favorite movie at the same time -- More processing can combined at the same time (for instance the depth process can be applied outside the mask) +- If you ever wanted to watch Star Wars in 4:3, just use the new *Outpainting* feature and it will add the missing bits of image at the top and the bottom of the screen. The best thing is *Outpainting* can be combined with all the other Vace modifications, for instance you can change the main character of your favorite movie at the same time +- More processing can combined at the same time (for instance the depth process can be applied outside the mask) - Upgraded the depth extractor to Depth Anything 2 which is much more detailed As a bonus, I have added two finetunes based on the Safe-Forcing technology (which requires only 4 steps to generate a video): Wan 2.1 text2video Self-Forcing and Vace Self-Forcing. I know there is Lora around but the quality of the Lora is worse (at least with Vace) compared to the full model. Don't hesitate to share your opinion about this on the discord server. - ### June 17 2025: WanGP v6.1, Vace Powercharged - πŸ‘‹ Lots of improvements for Vace the Mother of all Models: - - masks can now be combined with on the fly processing of a control video, for instance you can extract the motion of a specific person defined by a mask - on the fly modification of masks : reversed masks (with the same mask you can modify the background instead of the people covered by the masks), enlarged masks (you can cover more area if for instance the person you are trying to inject is larger than the one in the mask), ... - view these modified masks directly inside WanGP during the video generation to check they are really as expected @@ -132,62 +116,52 @@ Of course all these new stuff work on all Vace finetunes (including Vace Fusioni Thanks also to Reevoy24 for adding a Notfication sound at the end of a generation and for fixing the background color of the current generation summary. ### June 12 2025: WanGP v6.0 - -πŸ‘‹ _Finetune models_: You find the 20 models supported by WanGP not sufficient ? Too impatient to wait for the next release to get the support for a newly released model ? Your prayers have been answered: if a new model is compatible with a model architecture supported by WanGP, you can add by yourself the support for this model in WanGP by just creating a finetune model definition. You can then store this model in the cloud (for instance in Huggingface) and the very light finetune definition file can be easily shared with other users. WanGP will download automatically the finetuned model for them. +πŸ‘‹ *Finetune models*: You find the 20 models supported by WanGP not sufficient ? Too impatient to wait for the next release to get the support for a newly released model ? Your prayers have been answered: if a new model is compatible with a model architecture supported by WanGP, you can add by yourself the support for this model in WanGP by just creating a finetune model definition. You can then store this model in the cloud (for instance in Huggingface) and the very light finetune definition file can be easily shared with other users. WanGP will download automatically the finetuned model for them. To celebrate the new finetunes support, here are a few finetune gifts (directly accessible from the model selection menu): - -- _Fast Hunyuan Video_ : generate model t2v in only 6 steps -- _Hunyuan Vido AccVideo_ : generate model t2v in only 5 steps -- _Wan FusioniX_: it is a combo of AccVideo / CausVid ans other models and can generate high quality Wan videos in only 8 steps +- *Fast Hunyuan Video* : generate model t2v in only 6 steps +- *Hunyuan Vido AccVideo* : generate model t2v in only 5 steps +- *Wan FusioniX*: it is a combo of AccVideo / CausVid ans other models and can generate high quality Wan videos in only 8 steps One more thing... -The new finetune system can be used to combine complementaty models : what happens when you combine Fusionix Text2Video and Vace Control Net ? +The new finetune system can be used to combine complementaty models : what happens when you combine Fusionix Text2Video and Vace Control Net ? You get **Vace FusioniX**: the Ultimate Vace Model, Fast (10 steps, no need for guidance) and with a much better quality Video than the original slower model (despite being the best Control Net out there). Here goes one more finetune... -Check the _Finetune Guide_ to create finetune models definitions and share them on the WanGP discord server. +Check the *Finetune Guide* to create finetune models definitions and share them on the WanGP discord server. ### June 11 2025: WanGP v5.5 +πŸ‘‹ *Hunyuan Video Custom Audio*: it is similar to Hunyuan Video Avatar except there isn't any lower limit on the number of frames and you can use your reference images in a different context than the image itself\ +*Hunyuan Video Custom Edit*: Hunyuan Video Controlnet, use it to do inpainting and replace a person in a video while still keeping his poses. Similar to Vace but less restricted than the Wan models in terms of content... -πŸ‘‹ _Hunyuan Video Custom Audio_: it is similar to Hunyuan Video Avatar except there isn't any lower limit on the number of frames and you can use your reference images in a different context than the image itself\ -_Hunyuan Video Custom Edit_: Hunyuan Video Controlnet, use it to do inpainting and replace a person in a video while still keeping his poses. Similar to Vace but less restricted than the Wan models in terms of content... ### June 6 2025: WanGP v5.41 - πŸ‘‹ Bonus release: Support for **AccVideo** Lora to speed up x2 Video generations in Wan models. Check the Loras documentation to get the usage instructions of AccVideo.\ -You will need to do a _pip install -r requirements.txt_ +You will need to do a *pip install -r requirements.txt* ### June 6 2025: WanGP v5.4 - πŸ‘‹ World Exclusive : **Hunyuan Video Avatar** Support ! You won't need 80 GB of VRAM nor 32 GB oF VRAM, just 10 GB of VRAM will be sufficient to generate up to 15s of high quality speech / song driven Video at a high speed with no quality degradation. Support for TeaCache included.\ Here is a link to the original repo where you will find some very interesting documentation and examples. https://github.com/Tencent-Hunyuan/HunyuanVideo-Avatar. Kudos to the Hunyuan Video Avatar team for the best model of its kind.\ Also many thanks to Reevoy24 for his repackaging / completing the documentation ### May 28 2025: WanGP v5.31 - πŸ‘‹ Added **Phantom 14B**, a model that you can use to transfer objects / people in the video. My preference goes to Vace that remains the king of controlnets. VACE improvements: Better sliding window transitions, image mask support in Matanyone, new Extend Video feature, and enhanced background removal options. ### May 26, 2025: WanGP v5.3 - πŸ‘‹ Settings management revolution! Now you can: - -- Select any generated video and click _Use Selected Video Settings_ to instantly reuse its configuration +- Select any generated video and click *Use Selected Video Settings* to instantly reuse its configuration - Drag & drop videos to automatically extract their settings metadata - Export/import settings as JSON files for easy sharing and backup ### May 20, 2025: WanGP v5.2 - πŸ‘‹ **CausVid support** - Generate videos in just 4-12 steps with the new distilled Wan model! Also added experimental MoviiGen for 1080p generation (20GB+ VRAM required). Check the Loras documentation to get the usage instructions of CausVid. ### May 18, 2025: WanGP v5.1 - πŸ‘‹ **LTX Video 13B Distilled** - Generate high-quality videos in less than one minute! ### May 17, 2025: WanGP v5.0 - πŸ‘‹ **One App to Rule Them All!** Added Hunyuan Video and LTX Video support, plus Vace 14B and integrated prompt enhancer. See full changelog: **[Changelog](docs/CHANGELOG.md)** @@ -202,38 +176,7 @@ See full changelog: **[Changelog](docs/CHANGELOG.md)** ## πŸš€ Quick Start -**One-click installation:** Get started instantly with [Pinokio App](https://pinokio.computer/) - -**Manual installation:** - -```bash -git clone https://github.com/deepbeepmeep/Wan2GP.git -cd Wan2GP -conda create -n wan2gp python=3.10.9 -conda activate wan2gp -pip install torch==2.7.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu124 -pip install -r requirements.txt -``` - -**Run the application:** - -```bash -python wgp.py # Text-to-video (default) -python wgp.py --i2v # Image-to-video -``` - -**Update the application:** -If using Pinokio use Pinokio to update otherwise: -Get in the directory where WanGP is installed and: - -```bash -git pull -pip install -r requirements.txt -``` - -## πŸ“¦ Installation - -### 🐳 Docker Installation +### 🐳 Docker: **For Debian-based systems (Ubuntu, Debian, etc.):** @@ -260,21 +203,44 @@ This automated script will: **Supported GPUs:** RTX 50XX, RTX 40XX, RTX 30XX, RTX 20XX, GTX 16XX, GTX 10XX, Tesla V100, A100, H100, and more. -### Manual Installation +**One-click installation:** Get started instantly with [Pinokio App](https://pinokio.computer/) + +**Manual installation:** +```bash +git clone https://github.com/deepbeepmeep/Wan2GP.git +cd Wan2GP +conda create -n wan2gp python=3.10.9 +conda activate wan2gp +pip install torch==2.7.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu124 +pip install -r requirements.txt +``` + +**Run the application:** +```bash +python wgp.py # Text-to-video (default) +python wgp.py --i2v # Image-to-video +``` + +**Update the application:** +If using Pinokio use Pinokio to update otherwise: +Get in the directory where WanGP is installed and: +```bash +git pull +pip install -r requirements.txt +``` + +## πŸ“¦ Installation For detailed installation instructions for different GPU generations: - - **[Installation Guide](docs/INSTALLATION.md)** - Complete setup instructions for RTX 10XX to RTX 50XX ## 🎯 Usage ### Basic Usage - - **[Getting Started Guide](docs/GETTING_STARTED.md)** - First steps and basic usage - **[Models Overview](docs/MODELS.md)** - Available models and their capabilities ### Advanced Features - - **[Loras Guide](docs/LORAS.md)** - Using and managing Loras for customization - **[Finetunes](docs/FINETUNES.md)** - Add manually new models to WanGP - **[VACE ControlNet](docs/VACE.md)** - Advanced video control and manipulation @@ -288,7 +254,6 @@ For detailed installation instructions for different GPU generations: ## πŸ”— Related Projects ### Other Models for the GPU Poor - - **[HuanyuanVideoGP](https://github.com/deepbeepmeep/HunyuanVideoGP)** - One of the best open source Text to Video generators - **[Hunyuan3D-2GP](https://github.com/deepbeepmeep/Hunyuan3D-2GP)** - Image to 3D and text to 3D tool - **[FluxFillGP](https://github.com/deepbeepmeep/FluxFillGP)** - Inpainting/outpainting tools based on Flux