Python
Merge branch 'main' into feature_add-cuda-docker-runner
Ciprian Mandachef01a4865b84b
diff --cc README.mdindex fb04ce1,2f82828..dff2873--- a/README.md+++ b/README.md@@@ -19,7 -19,157 +19,157 @@@ WanGP supports the Wan (and derived mod**Follow DeepBeepMeep on Twitter/X to get the Latest News**: https://x.com/deepbeepmeep- ## 🔥 Latest Updates-## 🔥 Latest Updates :++## 🔥 Latest Updates :+ ### August 29 2025: WanGP v8.2 - Here Goes Your Weekend++ - **InfiniteTalk Video to Video**: this feature can be used for Video Dubbing. Keep in mind that it is a *Sparse Video to Video*, that is internally only image is used by Sliding Window. However thanks to the new *Smooth Transition* mode, each new clip is connected to the previous and all the camera work is done by InfiniteTalk. If you dont get any transition, increase the number of frames of a Sliding Window (81 frames recommended)++ - **StandIn**: very light model specialized in Identity Transfer. I have provided two versions of Standin: a basic one derived from the text 2 video model and another based on Vace. If used with Vace, the last reference frame given to Vace will be also used for StandIn++ - **Flux ESO**: a new Flux dervied *Image Editing tool*, but this one is specialized both in *Identity Transfer* and *Style Transfer*. Style has to be understood in its wide meaning: give a reference picture of a person and another one of Sushis and you will turn this person into Sushis++ ### August 24 2025: WanGP v8.1 - the RAM Liberator+-- **Reserved RAM entirely freed when switching models**, you should get much less out of memory related to RAM. I have also added a button in *Configuration / Performance* that will release most of the RAM used by WanGP if you want to use another application without quitting WanGP++- **Reserved RAM entirely freed when switching models**, you should get much less out of memory related to RAM. I have also added a button in *Configuration / Performance* that will release most of the RAM used by WanGP if you want to use another application without quitting WanGP+ - **InfiniteTalk** support: improved version of Multitalk that supposedly supports very long video generations based on an audio track. Exists in two flavors (*Single Speaker* and *Multi Speakers*) but doesnt seem to be compatible with Vace. One key new feature compared to Multitalk is that you can have different visual shots associated to the same audio: each Reference frame you provide you will be associated to a new Sliding Window. If only Reference frame is provided, it will be used for all windows. When Continuing a video, you can either continue the current shot (no Reference Frame) or add new shots (one or more Reference Frames).\+ If you are not into audio, you can use still this model to generate infinite long image2video, just select "no speaker". Last but not least, Infinitetalk works works with all the Loras accelerators.+ - **Flux Chroma 1 HD** support: uncensored flux based model and lighter than Flux (8.9B versus 12B) and can fit entirely in VRAM with only 16 GB of VRAM. Unfortunalely it is not distilled and you will need CFG at minimum 20 steps++ ### August 21 2025: WanGP v8.01 - the killer of seven++ - **Qwen Image Edit** : Flux Kontext challenger (prompt driven image edition). Best results (including Identity preservation) will be obtained at 720p. Beyond you may get image outpainting and / or lose identity preservation. Below 720p prompt adherence will be worse. Qwen Image Edit works with Qwen Lora Lightning 4 steps. I have also unlocked all the resolutions for Qwen models. Bonus Zone: support for multiple image compositions but identity preservation won't be as good.+ - **On demand Prompt Enhancer** (needs to be enabled in Configuration Tab) that you can use to Enhance a Text Prompt before starting a Generation. You can refine the Enhanced Prompt or change the original Prompt.+ - Choice of a **Non censored Prompt Enhancer**. Beware this is one is VRAM hungry and will require 12 GB of VRAM to work-- **Memory Profile customizable per model** : useful to set for instance Profile 3 (preload the model entirely in VRAM) with only Image Generation models, if you have 24 GB of VRAM. In that case Generation will be much faster because with Image generators (contrary to Video generators) as a lot of time is wasted in offloading++- **Memory Profile customizable per model** : useful to set for instance Profile 3 (preload the model entirely in VRAM) with only Image Generation models, if you have 24 GB of VRAM. In that case Generation will be much faster because with Image generators (contrary to Video generators) as a lot of time is wasted in offloading+ - **Expert Guidance Mode**: change the Guidance during the generation up to 2 times. Very useful with Wan 2.2 Ligthning to reduce the slow motion effect. The idea is to insert a CFG phase before the 2 accelerated phases that follow and have no Guidance. I have added the finetune *Wan2.2 Vace Lightning 3 Phases 14B* with a prebuilt configuration. Please note that it is a 8 steps process although the lora lightning is 4 steps. This expert guidance mode is also available with Wan 2.1.++ *WanGP 8.01 update, improved Qwen Image Edit Identity Preservation*+ ### August 12 2025: WanGP v7.7777 - Lucky Day(s)++ This is your lucky day ! thanks to new configuration options that will let you store generated Videos and Images in lossless compressed formats, you will find they in fact they look two times better without doing anything !++ Just kidding, they will be only marginally better, but at least this opens the way to professionnal editing.++ Support:+ - Video: x264, x264 lossless, x265+ - Images: jpeg, png, webp, wbp lossless+ Generation Settings are stored in each of the above regardless of the format (that was the hard part).++ Also you can now choose different output directories for images and videos.+-unexpected luck: fixed lightning 8 steps for Qwen, and lightning 4 steps for Wan 2.2, now you just need 1x multiplier no weird numbers.++unexpected luck: fixed lightning 8 steps for Qwen, and lightning 4 steps for Wan 2.2, now you just need 1x multiplier no weird numbers.+ *update 7.777 : oops got a crash a with FastWan ? Luck comes and goes, try a new update, maybe you will have a better chance this time*+ *update 7.7777 : Sometime good luck seems to last forever. For instance what if Qwen Lightning 4 steps could also work with WanGP ?*+ - https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Lightning-4steps-V1.0-bf16.safetensors (Qwen Lightning 4 steps)+ - https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Lightning-8steps-V1.1-bf16.safetensors (new improved version of Qwen Lightning 8 steps)+++ ### August 10 2025: WanGP v7.76 - Faster than the VAE ...-We have a funny one here today: FastWan 2.2 5B, the Fastest Video Generator, only 20s to generate 121 frames at 720p. The snag is that VAE is twice as slow...++We have a funny one here today: FastWan 2.2 5B, the Fastest Video Generator, only 20s to generate 121 frames at 720p. The snag is that VAE is twice as slow...+ Thanks to Kijai for extracting the Lora that is used to build the corresponding finetune.++ *WanGP 7.76: fixed the messed up I did to i2v models (loras path was wrong for Wan2.2 and Clip broken)*++ ### August 9 2025: WanGP v7.74 - Qwen Rebirth part 2+ Added support for Qwen Lightning lora for a 8 steps generation (https://huggingface.co/lightx2v/Qwen-Image-Lightning/blob/main/Qwen-Image-Lightning-8steps-V1.0.safetensors). Lora is not normalized and you can use a multiplier around 0.1.++ Mag Cache support for all the Wan2.2 models Don't forget to set guidance to 1 and 8 denoising steps , your gen will be 7x faster !++ ### August 8 2025: WanGP v7.73 - Qwen Rebirth+ Ever wondered what impact not using Guidance has on a model that expects it ? Just look at Qween Image in WanGP 7.71 whose outputs were erratic. Somehow I had convinced myself that Qwen was a distilled model. In fact Qwen was dying for a negative prompt. And in WanGP 7.72 there is at last one for him.+-As Qwen is not so picky after all I have added also quantized text encoder which reduces the RAM requirements of Qwen by 10 GB (the text encoder quantized version produced garbage before)++As Qwen is not so picky after all I have added also quantized text encoder which reduces the RAM requirements of Qwen by 10 GB (the text encoder quantized version produced garbage before)++ Unfortunately still the Sage bug for older GPU architectures. Added Sdpa fallback for these architectures.++ *7.73 update: still Sage / Sage2 bug for GPUs before RTX40xx. I have added a detection mechanism that forces Sdpa attention if that's the case*+++ ### August 6 2025: WanGP v7.71 - Picky, picky++ This release comes with two new models :+ - Qwen Image: a Commercial grade Image generator capable to inject full sentences in the generated Image while still offering incredible visuals+ - Wan 2.2 TextImage to Video 5B: the last Wan 2.2 needed if you want to complete your Wan 2.2 collection (loras for this folder can be stored in "\loras\5B" )+-There is catch though, they are very picky if you want to get good generations: first they both need lots of steps (50 ?) to show what they have to offer. Then for Qwen Image I had to hardcode the supported resolutions, because if you try anything else, you will get garbage. Likewise Wan 2.2 5B will remind you of Wan 1.0 if you don't ask for at least 720p.++There is catch though, they are very picky if you want to get good generations: first they both need lots of steps (50 ?) to show what they have to offer. Then for Qwen Image I had to hardcode the supported resolutions, because if you try anything else, you will get garbage. Likewise Wan 2.2 5B will remind you of Wan 1.0 if you don't ask for at least 720p.++ *7.71 update: Added VAE Tiling for both Qwen Image and Wan 2.2 TextImage to Video 5B, for low VRAM during a whole gen.*+++ ### August 4 2025: WanGP v7.6 - Remuxed++ With this new version you won't have any excuse if there is no sound in your video.++ *Continue Video* now works with any video that has already some sound (hint: Multitalk ).++ Also, on top of MMaudio and the various sound driven models I have added the ability to use your own soundtrack.+-As a result you can apply a different sound source on each new video segment when doing a *Continue Video*.++As a result you can apply a different sound source on each new video segment when doing a *Continue Video*.++ For instance:+ - first video part: use Multitalk with two people speaking+ - second video part: you apply your own soundtrack which will gently follow the multitalk conversation+ - third video part: you use Vace effect and its corresponding control audio will be concatenated to the rest of the audio++ To multiply the combinations I have also implemented *Continue Video* with the various image2video models.++ Also:+ - End Frame support added for LTX Video models+ - Loras can now be targetted specifically at the High noise or Low noise models with Wan 2.2, check the Loras and Finetune guides+ - Flux Krea Dev support++ ### July 30 2025: WanGP v7.5: Just another release ... Wan 2.2 part 2+ Here is now Wan 2.2 image2video a very good model if you want to set Start and End frames. Two Wan 2.2 models delivered, only one to go ...++ Please note that although it is an image2video model it is structurally very close to Wan 2.2 text2video (same layers with only a different initial projection). Given that Wan 2.1 image2video loras don't work too well (half of their tensors are not supported), I have decided that this model will look for its loras in the text2video loras folder instead of the image2video folder.++ I have also optimized RAM management with Wan 2.2 so that loras and modules will be loaded only once in RAM and Reserved RAM, this saves up to 5 GB of RAM which can make a difference...++ And this time I really removed Vace Cocktail Light which gave a blurry vision.++ ### July 29 2025: WanGP v7.4: Just another release ... Wan 2.2 Preview+ Wan 2.2 is here. The good news is that WanGP wont require a single byte of extra VRAM to run it and it will be as fast as Wan 2.1. The bad news is that you will need much more RAM if you want to leverage entirely this new model since it has twice has many parameters.++ So here is a preview version of Wan 2.2 that is without the 5B model and Wan 2.2 image to video for the moment.++ However as I felt bad to deliver only half of the wares, I gave you instead .....** Wan 2.2 Vace Experimental Cocktail** !++ Very good surprise indeed, the loras and Vace partially work with Wan 2.2. We will need to wait for the official Vace 2.2 release since some Vace features are broken like identity preservation++ Bonus zone: Flux multi images conditions has been added, or maybe not if I broke everything as I have been distracted by Wan...++ 7.4 update: I forgot to update the version number. I also removed Vace Cocktail light which didnt work well.++ ### July 27 2025: WanGP v7.3 : Interlude+ While waiting for Wan 2.2, you will appreciate the model selection hierarchy which is very useful to collect even more models. You will also appreciate that WanGP remembers which model you used last in each model family.++ ### July 26 2025: WanGP v7.2 : Ode to Vace+ I am really convinced that Vace can do everything the other models can do and in a better way especially as Vace can be combined with Multitalk.++ Here are some new Vace improvements:+ - I have provided a default finetune named *Vace Cocktail* which is a model created on the fly using the Wan text 2 video model and the Loras used to build FusioniX. The weight of the *Detail Enhancer* Lora has been reduced to improve identity preservation. Copy the model definition in *defaults/vace_14B_cocktail.json* in the *finetunes/* folder to change the Cocktail composition. Cocktail contains already some Loras acccelerators so no need to add on top a Lora Accvid, Causvid or Fusionix, ... . The whole point of Cocktail is to be able to build you own FusioniX (which originally is a combination of 4 loras) but without the inconvenient of FusioniX.-- Talking about identity preservation, it tends to go away when one generates a single Frame instead of a Video which is shame for our Vace photoshop. But there is a solution : I have added an Advanced Quality option, that tells WanGP to generate a little more than a frame (it will still keep only the first frame). It will be a little slower but you will be amazed how Vace Cocktail combined with this option will preserve identities (bye bye *Phantom*).++- Talking about identity preservation, it tends to go away when one generates a single Frame instead of a Video which is shame for our Vace photoshop. But there is a solution : I have added an Advanced Quality option, that tells WanGP to generate a little more than a frame (it will still keep only the first frame). It will be a little slower but you will be amazed how Vace Cocktail combined with this option will preserve identities (bye bye *Phantom*).+ - As in practise I have observed one switches frequently between *Vace text2video* and *Vace text2image* I have put them in the same place they are now just one tab away, no need to reload the model. Likewise *Wan text2video* and *Wan tex2image* have been merged.+ - Color fixing when using Sliding Windows. A new postprocessing *Color Correction* applied automatically by default (you can disable it in the *Advanced tab Sliding Window*) will try to match the colors of the new window with that of the previous window. It doesnt fix all the unwanted artifacts of the new window but at least this makes the transition smoother. Thanks to the multitalk team for the original code.++ Also you will enjoy our new real time statistics (CPU / GPU usage, RAM / VRAM used, ... ). Many thanks to **Redtash1** for providing the framework for this new feature ! You need to go in the Config tab to enable real time stats.+++ ### July 21 2025: WanGP v7.12+ - Flux Family Reunion : *Flux Dev* and *Flux Schnell* have been invited aboard WanGP. To celebrate that, Loras support for the Flux *diffusers* format has also been added.++ - LTX Video upgraded to version 0.9.8: you can now generate 1800 frames (1 min of video !) in one go without a sliding window. With the distilled model it will take only 5 minutes with a RTX 4090 (you will need 22 GB of VRAM though). I have added options to select higher humber frames if you want to experiment (go to Configuration Tab / General / Increase the Max Number of Frames, change the value and restart the App)+-- LTX Video ControlNet : it is a Control Net that allows you for instance to transfer a Human motion or Depth from a control video. It is not as powerful as Vace but can produce interesting things especially as now you can generate quickly a 1 min video. Under the scene IC-Loras (see below) for Pose, Depth and Canny are automatically loaded for you, no need to add them.++- LTX Video ControlNet : it is a Control Net that allows you for instance to transfer a Human motion or Depth from a control video. It is not as powerful as Vace but can produce interesting things especially as now you can generate quickly a 1 min video. Under the scene IC-Loras (see below) for Pose, Depth and Canny are automatically loaded for you, no need to add them.++ - LTX IC-Lora support: these are special Loras that consumes a conditional image or video+ Beside the pose, depth and canny IC-Loras transparently loaded there is the *detailer* (https://huggingface.co/Lightricks/LTX-Video-ICLoRA-detailer-13b-0.9.8) which is basically an upsampler. Add the *detailer* as a Lora and use LTX Raw Format as control net choice to use it.++ - Matanyone is now also for the GPU Poor as its VRAM requirements have been divided by 2! (7.12 shadow update)+-- Easier way to select video resolution++- Easier way to select video resolution++### July 15 2025: WanGP v7.0 is an AI Powered PhotoshopThis release turns the Wan models into Image Generators. This goes way more than allowing to generate a video made of single frame :- Multiple Images generated at the same time so that you can choose the one you like best.It is Highly VRAM optimized so that you can generate for instance 4 720p Images at the same time with less than 10 GBdiff --cc requirements.txtindex 312dc94,a2e1fde..767a68d--- a/requirements.txt+++ b/requirements.txt@@@ -8,42 -5,57 +5,57 @@@ tokenizers>=0.20.accelerate>=1.1.1tqdmimageio- easydict- ftfy- dashscopeimageio-ffmpeg- # flash_attn- gradio==5.23.0- numpy>=1.23.5,<2einops+ sentencepiece+ open_clip_torch>=2.29.0++ # Video & mediamoviepy==1.0.3- mmgp==3.5.1- peft==0.17.0+ av+ ffmpeg-python+ pygame>=2.1.0+ sounddevice>=0.4.0+ soundfilemutagen- pydantic==2.10.6- decord- onnxruntime-gpu+ pyloudnorm+ librosa==0.11.0++ # UI & interaction+ gradio==5.23.0+ dashscope+ loguru++ # Vision & segmentation+ opencv-python>=4.9.0.80+ segment-anythingrembg[gpu]==2.0.65- matplotlib+ onnxruntime-gpu+ decordtimm- segment-anything++ # Config & orchestrationomegaconfhydra-core- librosa==0.11.0- loguru- sentencepiece- av- opencv-python- pygame>=2.1.0- sounddevice>=0.4.0- # rembg==2.0.65- torchdiffeq >= 0.2.5- tensordict >= 0.6.1- open_clip_torch >= 2.29.0- pyloudnorm+ easydict+ pydantic==2.10.6++ # Math & modeling+ torchdiffeq>=0.2.5+ tensordict>=0.6.1+ mmgp==3.5.10-peft==0.15.0++peft==0.17.0+ matplotlib++ # Utilities+ ftfy+ piexif+ pynvmlmisaki- soundfile- ffmpeg-python- pyannote.audio++ # Optional / commented out+ # transformers==4.46.3 # for llamallava pre-patch+ # rembg==2.0.65 # non-GPU fallback+ # huggingface_hub[hf_xet] # slows down everything# num2words# spacy