mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-11-04 14:16:57 +00:00
fix ?
This commit is contained in:
parent
64c59c15d9
commit
afbf94e44f
@ -683,7 +683,7 @@ class WanAny2V:
|
||||
# init denoising
|
||||
updated_num_steps= len(timesteps)
|
||||
if callback != None:
|
||||
from wgp import update_loras_slists
|
||||
from wan.utils.utils import update_loras_slists
|
||||
update_loras_slists(self.model, loras_slists, updated_num_steps)
|
||||
callback(-1, None, True, override_num_inference_steps = updated_num_steps)
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ from wan.utils.utils import calculate_new_dimensions
|
||||
from .utils.fm_solvers import (FlowDPMSolverMultistepScheduler,
|
||||
get_sampling_sigmas, retrieve_timesteps)
|
||||
from .utils.fm_solvers_unipc import FlowUniPCMultistepScheduler
|
||||
from wgp import update_loras_slists
|
||||
from wan.utils.utils import update_loras_slists
|
||||
|
||||
class DTT2V:
|
||||
|
||||
|
||||
@ -34,6 +34,12 @@ def seed_everything(seed: int):
|
||||
if torch.backends.mps.is_available():
|
||||
torch.mps.manual_seed(seed)
|
||||
|
||||
def update_loras_slists(trans, slists, num_inference_steps ):
|
||||
from mmgp import offload
|
||||
slists = [ expand_slist(slist, num_inference_steps ) if isinstance(slist, list) else slist for slist in slists ]
|
||||
nos = [str(l) for l in range(len(slists))]
|
||||
offload.activate_loras(trans, nos, slists )
|
||||
|
||||
def resample(video_fps, video_frames_count, max_target_frames_count, target_fps, start_target_frame ):
|
||||
import math
|
||||
|
||||
|
||||
3
wgp.py
3
wgp.py
@ -2107,7 +2107,8 @@ for file_path in models_def_paths:
|
||||
settings = json_def
|
||||
existing_model_def = models_def.get(model_type, None)
|
||||
if existing_model_def is not None:
|
||||
existing_settings = models_def["settings"]
|
||||
existing_settings = models_def.get("settings", None)
|
||||
if existing_settings != None:
|
||||
existing_settings.update(settings)
|
||||
existing_model_def.update(model_def)
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user