mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-11-04 14:16:57 +00:00
fixed loras ignored and other bugs
This commit is contained in:
parent
4103f5b935
commit
f5dc6d0f4d
@ -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
|
**Follow DeepBeepMeep on Twitter/X to get the Latest News**: https://x.com/deepbeepmeep
|
||||||
|
|
||||||
## 🔥 Latest Updates
|
## 🔥 Latest Updates
|
||||||
### July 2 2025: WanGP v6.5, WanGP takes care of you: lots of quality of life features:
|
### 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
|
- 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
|
- 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
|
- Manage multiple settings for the same model and switch between them using a dropdown box
|
||||||
@ -37,6 +37,8 @@ Taking care of your life is not enough, you want new stuff to play with ?
|
|||||||
- Choice of Wan Samplers / Schedulers
|
- Choice of Wan Samplers / Schedulers
|
||||||
- More Lora formats support
|
- More Lora formats support
|
||||||
|
|
||||||
|
**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 ?
|
### June 23 2025: WanGP v6.3, Vace Unleashed. Thought we couldnt squeeze Vace even more ?
|
||||||
- Multithreaded preprocessing when possible for faster generations
|
- Multithreaded preprocessing when possible for faster generations
|
||||||
- Multithreaded frames Lanczos Upsampling as a bonus
|
- Multithreaded frames Lanczos Upsampling as a bonus
|
||||||
|
|||||||
@ -17,7 +17,7 @@ gradio==5.23.0
|
|||||||
numpy>=1.23.5,<2
|
numpy>=1.23.5,<2
|
||||||
einops
|
einops
|
||||||
moviepy==1.0.3
|
moviepy==1.0.3
|
||||||
mmgp==3.5.0
|
mmgp==3.5.1
|
||||||
peft==0.15.0
|
peft==0.15.0
|
||||||
mutagen
|
mutagen
|
||||||
pydantic==2.10.6
|
pydantic==2.10.6
|
||||||
|
|||||||
@ -26,6 +26,7 @@ from .utils.fm_solvers import (FlowDPMSolverMultistepScheduler,
|
|||||||
from .utils.fm_solvers_unipc import FlowUniPCMultistepScheduler
|
from .utils.fm_solvers_unipc import FlowUniPCMultistepScheduler
|
||||||
from wan.modules.posemb_layers import get_rotary_pos_embed
|
from wan.modules.posemb_layers import get_rotary_pos_embed
|
||||||
from wan.utils.utils import resize_lanczos, calculate_new_dimensions
|
from wan.utils.utils import resize_lanczos, calculate_new_dimensions
|
||||||
|
from wan.utils.basic_flowmatch import FlowMatchScheduler
|
||||||
|
|
||||||
def optimized_scale(positive_flat, negative_flat):
|
def optimized_scale(positive_flat, negative_flat):
|
||||||
|
|
||||||
|
|||||||
@ -69,6 +69,15 @@ def get_file_creation_date(file_path):
|
|||||||
stat = os.stat(file_path)
|
stat = os.stat(file_path)
|
||||||
return datetime.fromtimestamp(stat.st_birthtime if hasattr(stat, 'st_birthtime') else stat.st_mtime)
|
return datetime.fromtimestamp(stat.st_birthtime if hasattr(stat, 'st_birthtime') else stat.st_mtime)
|
||||||
|
|
||||||
|
def truncate_for_filesystem(s, max_bytes=255):
|
||||||
|
if len(s.encode('utf-8')) <= max_bytes: return s
|
||||||
|
l, r = 0, len(s)
|
||||||
|
while l < r:
|
||||||
|
m = (l + r + 1) // 2
|
||||||
|
if len(s[:m].encode('utf-8')) <= max_bytes: l = m
|
||||||
|
else: r = m - 1
|
||||||
|
return s[:l]
|
||||||
|
|
||||||
def get_video_info(video_path):
|
def get_video_info(video_path):
|
||||||
import cv2
|
import cv2
|
||||||
cap = cv2.VideoCapture(video_path)
|
cap = cv2.VideoCapture(video_path)
|
||||||
|
|||||||
11
wgp.py
11
wgp.py
@ -47,8 +47,8 @@ global_queue_ref = []
|
|||||||
AUTOSAVE_FILENAME = "queue.zip"
|
AUTOSAVE_FILENAME = "queue.zip"
|
||||||
PROMPT_VARS_MAX = 10
|
PROMPT_VARS_MAX = 10
|
||||||
|
|
||||||
target_mmgp_version = "3.5.0"
|
target_mmgp_version = "3.5.1"
|
||||||
WanGP_version = "6.5"
|
WanGP_version = "6.51"
|
||||||
settings_version = 2.1
|
settings_version = 2.1
|
||||||
prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None
|
prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None
|
||||||
|
|
||||||
@ -4071,7 +4071,7 @@ def generate_video(
|
|||||||
preprocess_type = process_map.get(process_letter, "vace")
|
preprocess_type = process_map.get(process_letter, "vace")
|
||||||
else:
|
else:
|
||||||
preprocess_type2 = process_map.get(process_letter, None)
|
preprocess_type2 = process_map.get(process_letter, None)
|
||||||
process_names = { "pose": "Open Pose", "depth": "Depth Mask", "scribble" : "Shapes", "flow" : "Flow Map", "gray" : "Gray Levels", "inpaint" : "Inpaint Mask", "U": "Identity Mask", "vace" : "Vace Data"}
|
process_names = { "pose": "Open Pose", "depth": "Depth Mask", "scribble" : "Shapes", "flow" : "Flow Map", "gray" : "Gray Levels", "inpaint" : "Inpaint Mask", "identity": "Identity Mask", "vace" : "Vace Data"}
|
||||||
status_info = "Extracting " + process_names[preprocess_type]
|
status_info = "Extracting " + process_names[preprocess_type]
|
||||||
extra_process_list = ([] if preprocess_type2==None else [preprocess_type2]) + ([] if process_outside_mask==None or process_outside_mask == preprocess_type else [process_outside_mask])
|
extra_process_list = ([] if preprocess_type2==None else [preprocess_type2]) + ([] if process_outside_mask==None or process_outside_mask == preprocess_type else [process_outside_mask])
|
||||||
if len(extra_process_list) == 1:
|
if len(extra_process_list) == 1:
|
||||||
@ -4316,10 +4316,11 @@ def generate_video(
|
|||||||
|
|
||||||
time_flag = datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d-%Hh%Mm%Ss")
|
time_flag = datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d-%Hh%Mm%Ss")
|
||||||
save_prompt = original_prompts[0]
|
save_prompt = original_prompts[0]
|
||||||
|
from wan.utils.utils import truncate_for_filesystem
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
file_name = f"{time_flag}_seed{seed}_{sanitize_file_name(save_prompt[:50]).strip()}.mp4"
|
file_name = f"{time_flag}_seed{seed}_{sanitize_file_name(truncate_for_filesystem(save_prompt,50)).strip()}.mp4"
|
||||||
else:
|
else:
|
||||||
file_name = f"{time_flag}_seed{seed}_{sanitize_file_name(save_prompt[:100]).strip()}.mp4"
|
file_name = f"{time_flag}_seed{seed}_{sanitize_file_name(truncate_for_filesystem(save_prompt,100)).strip()}.mp4"
|
||||||
video_path = os.path.join(save_path, file_name)
|
video_path = os.path.join(save_path, file_name)
|
||||||
any_mmaudio = MMAudio_setting != 0 and server_config.get("mmaudio_enabled", 0) != 0 and sample.shape[1] >=fps
|
any_mmaudio = MMAudio_setting != 0 and server_config.get("mmaudio_enabled", 0) != 0 and sample.shape[1] >=fps
|
||||||
if audio_guide != None or any_mmaudio :
|
if audio_guide != None or any_mmaudio :
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user