mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-18 22:08:13 +00:00
@@ -1102,7 +1102,7 @@ class WanVideoPostUnit_AnimateFacePixelValues(PipelineUnit):
|
|||||||
|
|
||||||
def process(self, pipe: WanVideoPipeline, inputs_shared, inputs_posi, inputs_nega):
|
def process(self, pipe: WanVideoPipeline, inputs_shared, inputs_posi, inputs_nega):
|
||||||
if inputs_shared.get("animate_face_video", None) is None:
|
if inputs_shared.get("animate_face_video", None) is None:
|
||||||
return {}
|
return inputs_shared, inputs_posi, inputs_nega
|
||||||
inputs_posi["face_pixel_values"] = pipe.preprocess_video(inputs_shared["animate_face_video"])
|
inputs_posi["face_pixel_values"] = pipe.preprocess_video(inputs_shared["animate_face_video"])
|
||||||
inputs_nega["face_pixel_values"] = torch.zeros_like(inputs_posi["face_pixel_values"]) - 1
|
inputs_nega["face_pixel_values"] = torch.zeros_like(inputs_posi["face_pixel_values"]) - 1
|
||||||
return inputs_shared, inputs_posi, inputs_nega
|
return inputs_shared, inputs_posi, inputs_nega
|
||||||
@@ -1374,7 +1374,8 @@ def model_fn_wan_video(
|
|||||||
x = dit.patchify(x, control_camera_latents_input)
|
x = dit.patchify(x, control_camera_latents_input)
|
||||||
|
|
||||||
# Animate
|
# Animate
|
||||||
x, motion_vec = animate_adapter.after_patch_embedding(x, pose_latents, face_pixel_values)
|
if pose_latents is not None and face_pixel_values is not None:
|
||||||
|
x, motion_vec = animate_adapter.after_patch_embedding(x, pose_latents, face_pixel_values)
|
||||||
|
|
||||||
# Patchify
|
# Patchify
|
||||||
f, h, w = x.shape[2:]
|
f, h, w = x.shape[2:]
|
||||||
|
|||||||
Reference in New Issue
Block a user