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

Function _validate_args

app.py:36–58  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

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

Callers 1

_parse_argsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected