Compare commits

...

3 Commits

Author SHA1 Message Date
Ang Wang
6bc1a3822f
Merge 58059485c7 into 204f899b64 2025-05-13 15:28:34 +08:00
wangang.wa
58059485c7 Fix dist vace fwd hook error 2025-05-13 15:02:22 +08:00
wangang.wa
3fc0ac9adc Add vace exmaple jpg 2025-05-13 13:31:12 +08:00
4 changed files with 10 additions and 9 deletions

BIN
examples/bag.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
examples/heben.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

View File

@ -42,11 +42,11 @@ EXAMPLE_PROMPT = {
"examples/flf2v_input_last_frame.png",
},
"vace-1.3B": {
"src_ref_images": './bag.jpg,./heben.png',
"src_ref_images": 'examples/bag.jpg,examples/heben.png',
"prompt": "优雅的女士在精品店仔细挑选包包,她身穿一袭黑色修身连衣裙,搭配珍珠项链,展现出成熟女性的魅力。手中拿着一款复古风格的棕色皮质半月形手提包,正细致地观察其工艺与质地。店内灯光柔和,木质装潢营造出温馨而高级的氛围。中景,侧拍捕捉女士挑选瞬间,展现其品味与气质。"
},
"vace-14B": {
"src_ref_images": './bag.jpg,./heben.png',
"src_ref_images": 'examples/bag.jpg,examples/heben.png',
"prompt": "优雅的女士在精品店仔细挑选包包,她身穿一袭黑色修身连衣裙,搭配珍珠项链,展现出成熟女性的魅力。手中拿着一款复古风格的棕色皮质半月形手提包,正细致地观察其工艺与质地。店内灯光柔和,木质装潢营造出温馨而高级的氛围。中景,侧拍捕捉女士挑选瞬间,展现其品味与气质。"
}
}
@ -74,7 +74,7 @@ def _validate_args(args):
elif "flf2v" in args.task:
args.sample_shift = 16
elif "vace" in args.task:
args.sample_shift = 3.0
args.sample_shift = 8.0
# The default number of frames are 1 for text-to-image tasks and 81 for other tasks.
@ -490,10 +490,10 @@ def generate(args):
)
elif "vace" in args.task:
if args.prompt is None:
args.prompt = EXAMPLE_PROMPT[args.model_name]["prompt"]
args.src_video = EXAMPLE_PROMPT[args.model_name].get("src_video", None)
args.src_mask = EXAMPLE_PROMPT[args.model_name].get("src_mask", None)
args.src_ref_images = EXAMPLE_PROMPT[args.model_name].get("src_ref_images", None)
args.prompt = EXAMPLE_PROMPT[args.task]["prompt"]
args.src_video = EXAMPLE_PROMPT[args.task].get("src_video", None)
args.src_mask = EXAMPLE_PROMPT[args.task].get("src_mask", None)
args.src_ref_images = EXAMPLE_PROMPT[args.task].get("src_ref_images", None)
logging.info(f"Input prompt: {args.prompt}")
if args.use_prompt_extend and args.use_prompt_extend != 'plain':

View File

@ -87,9 +87,10 @@ def usp_dit_forward_vace(
c, get_sequence_parallel_world_size(),
dim=1)[get_sequence_parallel_rank()]
hints = []
for block in self.vace_blocks:
c = block(c, **new_kwargs)
hints = torch.unbind(c)[:-1]
c, c_skip = block(c, **new_kwargs)
hints.append(c_skip)
return hints