MCPcopy Create free account
hub / github.com/MeiGen-AI/InfiniteTalk / _parse_args

Function _parse_args

app.py:61–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59
60
61def _parse_args():
62 parser = argparse.ArgumentParser(
63 description="Generate a image or video from a text prompt or image using Wan"
64 )
65 parser.add_argument(
66 "--task",
67 type=str,
68 default="infinitetalk-14B",
69 choices=list(WAN_CONFIGS.keys()),
70 help="The task to run.")
71 parser.add_argument(
72 "--size",
73 type=str,
74 default="infinitetalk-480",
75 choices=list(SIZE_CONFIGS.keys()),
76 help="The buckget size of the generated video. The aspect ratio of the output video will follow that of the input image."
77 )
78 parser.add_argument(
79 "--frame_num",
80 type=int,
81 default=81,
82 help="How many frames to be generated in one clip. The number should be 4n+1"
83 )
84 parser.add_argument(
85 "--ckpt_dir",
86 type=str,
87 default='./weights/Wan2.1-I2V-14B-480P',
88 help="The path to the Wan checkpoint directory.")
89 parser.add_argument(
90 "--quant_dir",
91 type=str,
92 default=None,
93 help="The path to the Wan quant checkpoint directory.")
94 parser.add_argument(
95 "--infinitetalk_dir",
96 type=str,
97 default='weights/InfiniteTalk/single/infinitetalk.safetensors',
98 help="The path to the InfiniteTalk checkpoint directory.")
99 parser.add_argument(
100 "--wav2vec_dir",
101 type=str,
102 default='./weights/chinese-wav2vec2-base',
103 help="The path to the wav2vec checkpoint directory.")
104 parser.add_argument(
105 "--dit_path",
106 type=str,
107 default=None,
108 help="The path to the Wan checkpoint directory.")
109 parser.add_argument(
110 "--lora_dir",
111 type=str,
112 nargs='+',
113 default=None,
114 help="The path to the LoRA checkpoint directory.")
115 parser.add_argument(
116 "--lora_scale",
117 type=float,
118 nargs='+',

Callers 1

app.pyFile · 0.70

Calls 1

_validate_argsFunction · 0.70

Tested by

no test coverage detected