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
|
# init denoising
|
||||||
updated_num_steps= len(timesteps)
|
updated_num_steps= len(timesteps)
|
||||||
if callback != None:
|
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)
|
update_loras_slists(self.model, loras_slists, updated_num_steps)
|
||||||
callback(-1, None, True, override_num_inference_steps = 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,
|
from .utils.fm_solvers import (FlowDPMSolverMultistepScheduler,
|
||||||
get_sampling_sigmas, retrieve_timesteps)
|
get_sampling_sigmas, retrieve_timesteps)
|
||||||
from .utils.fm_solvers_unipc import FlowUniPCMultistepScheduler
|
from .utils.fm_solvers_unipc import FlowUniPCMultistepScheduler
|
||||||
from wgp import update_loras_slists
|
from wan.utils.utils import update_loras_slists
|
||||||
|
|
||||||
class DTT2V:
|
class DTT2V:
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,13 @@ def seed_everything(seed: int):
|
|||||||
torch.cuda.manual_seed(seed)
|
torch.cuda.manual_seed(seed)
|
||||||
if torch.backends.mps.is_available():
|
if torch.backends.mps.is_available():
|
||||||
torch.mps.manual_seed(seed)
|
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 ):
|
def resample(video_fps, video_frames_count, max_target_frames_count, target_fps, start_target_frame ):
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
|||||||
5
wgp.py
5
wgp.py
@ -2107,8 +2107,9 @@ for file_path in models_def_paths:
|
|||||||
settings = json_def
|
settings = json_def
|
||||||
existing_model_def = models_def.get(model_type, None)
|
existing_model_def = models_def.get(model_type, None)
|
||||||
if existing_model_def is not None:
|
if existing_model_def is not None:
|
||||||
existing_settings = models_def["settings"]
|
existing_settings = models_def.get("settings", None)
|
||||||
existing_settings.update(settings)
|
if existing_settings != None:
|
||||||
|
existing_settings.update(settings)
|
||||||
existing_model_def.update(model_def)
|
existing_model_def.update(model_def)
|
||||||
else:
|
else:
|
||||||
models_def[model_type] = model_def
|
models_def[model_type] = model_def
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user