mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-06-17 21:07:41 +00:00
Compare commits
No commits in common. "1a55891718947978c1acd6c5da037ea5df739066" and "20e1bc2503313149b3286f1fd92c7eca40f2fbdc" have entirely different histories.
1a55891718
...
20e1bc2503
10
generate.py
10
generate.py
@ -61,7 +61,9 @@ def _validate_args(args):
|
||||
# The default sampling steps are 40 for image-to-video tasks and 50 for text-to-video tasks.
|
||||
if args.sample_steps is None:
|
||||
args.sample_steps = 50
|
||||
if "i2v" in args.task:
|
||||
if "vace" in args.task:
|
||||
args.sample_steps = 25
|
||||
elif "i2v" in args.task:
|
||||
args.sample_steps = 40
|
||||
|
||||
|
||||
@ -69,8 +71,10 @@ def _validate_args(args):
|
||||
args.sample_shift = 5.0
|
||||
if "i2v" in args.task and args.size in ["832*480", "480*832"]:
|
||||
args.sample_shift = 3.0
|
||||
elif "flf2v" in args.task or "vace" in args.task:
|
||||
elif "flf2v" in args.task:
|
||||
args.sample_shift = 16
|
||||
elif "vace" in args.task:
|
||||
args.sample_shift = 8.0
|
||||
|
||||
|
||||
# The default number of frames are 1 for text-to-image tasks and 81 for other tasks.
|
||||
@ -505,7 +509,7 @@ def generate(args):
|
||||
args.prompt = input_prompt[0]
|
||||
logging.info(f"Extended prompt: {args.prompt}")
|
||||
|
||||
logging.info("Creating VACE pipeline.")
|
||||
logging.info("Creating WanT2V pipeline.")
|
||||
wan_vace = wan.WanVace(
|
||||
config=cfg,
|
||||
checkpoint_dir=args.ckpt_dir,
|
||||
|
Loading…
Reference in New Issue
Block a user