mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-11-04 14:16:57 +00:00
various fixes for wan 2.2
This commit is contained in:
parent
f2a60ba321
commit
59cedccced
@ -19,19 +19,20 @@ WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models
|
||||
|
||||
**Follow DeepBeepMeep on Twitter/X to get the Latest News**: https://x.com/deepbeepmeep
|
||||
|
||||
## 🔥 Latest Updates
|
||||
## 🔥 Latest Updates :
|
||||
### 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 Cocktail** !
|
||||
|
||||
Very good surprise indeed, the loras and Vace mostly work with Wan 2.2 !!! I have made also a light version of the cocktail that uses only half of the parameters of Wan 2.2, this version has exactly the same RAM requirements as Wan 2.1. but Videos baked with half of the model are not so good. Maybe they are better than Wan 2.1 . So you tell me if we should keep the light version.
|
||||
|
||||
Probably Multitalk should work too, but I have a life to attend to so I will let you test.
|
||||
Very good surprise indeed, the loras and Vace partially work with Wan 2.2. We will need 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.
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{
|
||||
"model": {
|
||||
"name": "Wan2.2 Vace Cocktail 14B",
|
||||
"name": "Wan2.2 Vace Experimental Cocktail 14B",
|
||||
"architecture": "vace_14B",
|
||||
"modules": [
|
||||
"vace_14B"
|
||||
],
|
||||
"description": "This model has been created on the fly using the Wan text 2.2 video model and the Loras of FusioniX. The weight of the Detail Enhancer Lora has been reduced to improve identity preservation. Copy the model def in the finetune folder to change the Cocktail composition.",
|
||||
"description": "This model has been created on the fly using the Wan text 2.2 video model and the Loras of FusioniX. The weight of the Detail Enhancer Lora has been reduced to improve identity preservation. There is so far only PARTIAL support of Vace 2.1 which is currently used.",
|
||||
"URLs": "t2v_2_2",
|
||||
"URLs2": "t2v_2_2",
|
||||
"loras": [
|
||||
|
||||
@ -16,11 +16,8 @@ from flux.modules.autoencoder import AutoEncoder, AutoEncoderParams
|
||||
from flux.modules.conditioner import HFEmbedder
|
||||
|
||||
CHECKPOINTS_DIR = Path("checkpoints")
|
||||
CHECKPOINTS_DIR.mkdir(exist_ok=True)
|
||||
BFL_API_KEY = os.getenv("BFL_API_KEY")
|
||||
|
||||
os.environ.setdefault("TRT_ENGINE_DIR", str(CHECKPOINTS_DIR / "trt_engines"))
|
||||
(CHECKPOINTS_DIR / "trt_engines").mkdir(exist_ok=True)
|
||||
BFL_API_KEY = os.getenv("BFL_API_KEY")
|
||||
|
||||
|
||||
def ensure_hf_auth():
|
||||
|
||||
@ -125,6 +125,9 @@ class WanAny2V:
|
||||
# offload.load_model_data(self.model, "c:/temp/Phantom-Wan-1.3B.pth")
|
||||
self.model.lock_layers_dtypes(torch.float32 if mixed_precision_transformer else dtype)
|
||||
offload.change_dtype(self.model, dtype, True)
|
||||
if self.model2 is not None:
|
||||
self.model2.lock_layers_dtypes(torch.float32 if mixed_precision_transformer else dtype)
|
||||
offload.change_dtype(self.model2, dtype, True)
|
||||
# offload.save_model(self.model, "wan2.1_text2video_1.3B_mbf16.safetensors", do_quantize= False, config_file_path=base_config_file, filter_sd=sd)
|
||||
# offload.save_model(self.model, "wan2.2_text2video_14B_high_mbf16.safetensors", config_file_path=base_config_file)
|
||||
# offload.save_model(self.model, "wan2.2_text2video_14B_high_quanto_mfp16_int8.safetensors", do_quantize=True, config_file_path=base_config_file)
|
||||
|
||||
15
wgp.py
15
wgp.py
@ -51,7 +51,7 @@ AUTOSAVE_FILENAME = "queue.zip"
|
||||
PROMPT_VARS_MAX = 10
|
||||
|
||||
target_mmgp_version = "3.5.1"
|
||||
WanGP_version = "7.3"
|
||||
WanGP_version = "7.4"
|
||||
settings_version = 2.23
|
||||
max_source_video_frames = 3000
|
||||
prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None
|
||||
@ -2797,13 +2797,14 @@ def load_models(model_type):
|
||||
budgets = { "transformer" : 100 if preload == 0 else preload, "text_encoder" : 100 if preload == 0 else preload, "*" : max(1000 if profile==5 else 3000 , preload) }
|
||||
if "transformer2" in pipe:
|
||||
budgets["transformer2"] = 100 if preload == 0 else preload
|
||||
loras_transformer += ["transformer2"]
|
||||
kwargs["budgets"] = budgets
|
||||
elif profile == 3:
|
||||
kwargs["budgets"] = { "*" : "70%" }
|
||||
|
||||
if "transformer2" in pipe and profile in [2,4]:
|
||||
kwargs["pinnedMemory"] = ["transformer", "transformer2"]
|
||||
if "transformer2" in pipe:
|
||||
loras_transformer += ["transformer2"]
|
||||
if profile in [2,4]:
|
||||
kwargs["pinnedMemory"] = ["transformer", "transformer2"]
|
||||
|
||||
|
||||
global prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer
|
||||
@ -7087,8 +7088,8 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non
|
||||
video_prompt_type_image_refs = gr.Dropdown(
|
||||
choices=[
|
||||
("None", ""),
|
||||
("Inject only People / Objects", "I"),
|
||||
("Inject Main Subject / Landscape and then People / Objects", "KI"),
|
||||
("Conditional Images are People / Objects", "I"),
|
||||
("Conditional Images is first Main Subject / Landscape and may be followed by People / Objects", "KI"),
|
||||
],
|
||||
value=filter_letters(video_prompt_type_value, "KFI"),
|
||||
visible = True,
|
||||
@ -7136,7 +7137,7 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non
|
||||
remove_background_images_ref = gr.Dropdown(
|
||||
choices=[
|
||||
("Keep Backgrounds behind all Reference Images", 0),
|
||||
("Remove Backgrounds only behind People / Objects", 1),
|
||||
("Remove Backgrounds only behind People / Objects except main Subject" if flux else "Remove Backgrounds only behind People / Objects" , 1),
|
||||
],
|
||||
value=ui_defaults.get("remove_background_images_ref",1),
|
||||
label="Automatic Removal of Background of People or Objects (Only)", scale = 3, visible= "I" in video_prompt_type_value and not hunyuan_video_avatar
|
||||
|
||||
Loading…
Reference in New Issue
Block a user