MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / _validate_args

Function _validate_args

generate_multitalk.py:35–57  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

33
34
35def _validate_args(args):
36 # Basic check
37 assert args.ckpt_dir is not None, "Please specify the checkpoint directory."
38 assert args.task in WAN_CONFIGS, f"Unsupport task: {args.task}"
39
40 # The default sampling steps are 40 for image-to-video tasks and 50 for text-to-video tasks.
41 if args.sample_steps is None:
42 args.sample_steps = 40
43
44 if args.sample_shift is None:
45 if args.size == 'multitalk-480':
46 args.sample_shift = 7
47 elif args.size == 'multitalk-720':
48 args.sample_shift = 11
49 else:
50 raise NotImplementedError(f'Not supported size')
51
52 args.base_seed = args.base_seed if args.base_seed >= 0 else random.randint(
53 0, 99999999)
54 # Size check
55 assert args.size in SUPPORTED_SIZES[
56 args.
57 task], f"Unsupport size {args.size} for task {args.task}, supported sizes are: {', '.join(SUPPORTED_SIZES[args.task])}"
58
59
60def _parse_args():

Callers 1

_parse_argsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected