Skip to content
Python

loras optim

DeepBeepMeepe5ccf40404cc
diff --git a/README.md b/README.md
index db25ed6..a022d3f 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ 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 :
-### October 2 2025: WanGP v8.991 - One Last Thing before the Big Unknown ...
+### October 3 2025: WanGP v8.992 - One Last Thing before the Big Unknown ...
This new version hasn't any new model...
@@ -36,6 +36,8 @@ I have created the new Discord Channel **share-your-settings** where you can pos
Last but not least the Lora's documentation has been updated.
*update 8.991*: full power of *Vace Lynx* unleashed with new combinations such as Landscape + Face / Clothes + Face / Injectd Frame (Start/End frames/...) + Face
+*update 8.992*: optimized gen with Lora, should be 10% if many loras
+
### September 30 2025: WanGP v8.9 - Combinatorics
This new version of WanGP introduces **Wan 2.1 Lynx** the best Control Net so far to transfer *Facial Identity*. You will be amazed to recognize your friends even with a completely different hair style. Congrats to the *Byte Dance team* for this achievement. Lynx works quite with well *Fusionix t2v* 10 steps.
diff --git a/models/wan/any2video.py b/models/wan/any2video.py
index 243dddb..0ad61e6 100644
--- a/models/wan/any2video.py
+++ b/models/wan/any2video.py
@@ -708,8 +708,7 @@ class WanAny2V:
ip_hidden_states_uncond = arc_resampler(torch.zeros_like(arcface_embed)).to(self.dtype)
arc_resampler = None
if not lynx_lite:
- standin_ref_pos = -1
- image_ref = original_input_ref_images[standin_ref_pos]
+ image_ref = original_input_ref_images[-1]
from preprocessing.face_preprocessor import FaceProcessor
face_processor = FaceProcessor()
lynx_ref = face_processor.process(image_ref, resize_to = 256 )
@@ -736,7 +735,7 @@ class WanAny2V:
face_processor = None
gc.collect()
torch.cuda.empty_cache()
- standin_freqs = get_nd_rotary_pos_embed((-1, int(target_shape[-2]/2), int(target_shape[-1]/2) ), (-1, int(target_shape[-2]/2 + standin_ref.height/16), int(target_shape[-1]/2 + standin_ref.width/16) ))
+ standin_freqs = get_nd_rotary_pos_embed((-1, int(height/16), int(width/16) ), (-1, int(height/16 + standin_ref.height/16), int(width/16 + standin_ref.width/16) ))
standin_ref = self.vae.encode([ convert_image_to_tensor(standin_ref).unsqueeze(1) ], VAE_tile_size)[0].unsqueeze(0)
kwargs.update({ "standin_freqs": standin_freqs, "standin_ref": standin_ref, })
diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.py
index 060398c..a5d1e3d 100644
--- a/models/wan/wan_handler.py
+++ b/models/wan/wan_handler.py
@@ -255,10 +255,9 @@ class family_handler():
extra_model_def["set_video_prompt_type"]="Q"
extra_model_def["control_net_weight_alt_name"] = "Lynx"
extra_model_def["image_ref_choices"]["choices"] = [("None", ""),
- ("People / Objects", "I"),
- ("Landscape followed by People / Objects (if any)", "KI"),
- ("Positioned Frames followed by People / Objects (if any)", "FI"),
- ]
+ ("People / Objects (if any) then a Face", "I"),
+ ("Landscape followed by People / Objects (if any) then a Face", "KI"),
+ ("Positioned Frames followed by People / Objects (if any) then a Face", "FI")]
extra_model_def["background_removal_label"]= "Remove Backgrounds behind People / Objects, keep it for Landscape, Lynx Face or Positioned Frames"
extra_model_def["no_processing_on_last_images_refs"] = 1
@@ -266,6 +265,15 @@ class family_handler():
if base_model_type in ["standin"]:
extra_model_def["v2i_switch_supported"] = True
+ extra_model_def["image_ref_choices"] = {
+ "choices": [
+ ("No Reference Image", ""),
+ ("Reference Image is a Person Face", "I"),
+ ],
+ "visible": False,
+ "letters_filter":"I",
+ }
+ extra_model_def["one_image_ref_needed"] = True
if base_model_type in ["lynx_lite", "lynx"]:
extra_model_def["fit_into_canvas_image_refs"] = 0
@@ -292,7 +300,7 @@ class family_handler():
"visible": False,
"letters_filter":"I",
}
-
+ extra_model_def["one_image_ref_needed"] = True
extra_model_def["set_video_prompt_type"]= "Q"
extra_model_def["no_background_removal"] = True
extra_model_def["v2i_switch_supported"] = True
@@ -515,6 +523,13 @@ class family_handler():
video_prompt_type = video_prompt_type.replace("Q", "0")
ui_defaults["video_prompt_type"] = video_prompt_type
+ if settings_version < 2.39:
+ if base_model_type in ["fantasy"]:
+ audio_prompt_type = ui_defaults.get("audio_prompt_type", "")
+ if not "A" in audio_prompt_type:
+ audio_prompt_type += "A"
+ ui_defaults["audio_prompt_type"] = audio_prompt_type
+
@staticmethod
def update_default_settings(base_model_type, model_def, ui_defaults):
ui_defaults.update({
@@ -527,6 +542,7 @@ class family_handler():
ui_defaults.update({
"audio_guidance_scale": 5.0,
"sliding_window_overlap" : 1,
+ "audio_prompt_type": "A",
})
elif base_model_type in ["multitalk"]:
@@ -535,6 +551,7 @@ class family_handler():
"flow_shift": 7, # 11 for 720p
"sliding_window_discard_last_frames" : 4,
"sample_solver" : "euler",
+ "audio_prompt_type": "A",
"adaptive_switch" : 1,
})
diff --git a/requirements.txt b/requirements.txt
index 9b2c6ee..a17efd1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -48,7 +48,7 @@ pydantic==2.10.6
# Math & modeling
torchdiffeq>=0.2.5
tensordict>=0.6.1
-mmgp==3.6.0
+mmgp==3.6.1
peft==0.15.0
matplotlib
diff --git a/wgp.py b/wgp.py
index 9dc14b8..090bcce 100644
--- a/wgp.py
+++ b/wgp.py
@@ -62,9 +62,9 @@ global_queue_ref = []
AUTOSAVE_FILENAME = "queue.zip"
PROMPT_VARS_MAX = 10
-target_mmgp_version = "3.6.0"
-WanGP_version = "8.99"
-settings_version = 2.38
+target_mmgp_version = "3.6.1"
+WanGP_version = "8.992"
+settings_version = 2.39
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
@@ -5011,7 +5011,7 @@ def generate_video(
aligned_guide_start_frame = guide_start_frame - alignment_shift
aligned_guide_end_frame = guide_end_frame - alignment_shift
aligned_window_start_frame = window_start_frame - alignment_shift
- if fantasy:
+ if fantasy and audio_guide is not None:
audio_proj_split , audio_context_lens = parse_audio(audio_guide, start_frame = aligned_window_start_frame, num_frames= current_video_length, fps= fps, device= processing_device )
if multitalk:
from models.wan.multitalk.multitalk import get_window_audio_embeddings