MCPcopy Create free account
hub / github.com/TencentARC/MotionCtrl / get_parser

Function get_parser

main/evaluation/motionctrl_inference.py:320–341  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318 cv2.imwrite(path, img)
319
320def get_parser():
321 parser = argparse.ArgumentParser()
322 parser.add_argument("--savedir", type=str, default=None, help="results saving path")
323 parser.add_argument("--ckpt_path", type=str, default=None, help="checkpoint path")
324 parser.add_argument("--adapter_ckpt", type=str, default=None, help="adapter checkpoint path")
325 parser.add_argument("--base", type=str, help="config (yaml) path")
326 parser.add_argument("--condtype", default='frame', type=str, help="conditon type: {frame, depth, adapter}")
327 parser.add_argument("--prompt_dir", type=str, default=None, help="a data dir containing videos and prompts")
328 parser.add_argument("--n_samples", type=int, default=1, help="num of samples per prompt",)
329 parser.add_argument("--ddim_steps", type=int, default=50, help="steps of ddim if positive, otherwise use DDPM",)
330 parser.add_argument("--ddim_eta", type=float, default=1.0, help="eta for ddim sampling (0.0 yields deterministic sampling)",)
331 parser.add_argument("--bs", type=int, default=1, help="batch size for inference")
332 parser.add_argument("--height", type=int, default=512, help="image height, in pixel space")
333 parser.add_argument("--width", type=int, default=512, help="image width, in pixel space")
334 parser.add_argument("--unconditional_guidance_scale", type=float, default=1.0, help="prompt classifier-free guidance")
335 parser.add_argument("--unconditional_guidance_scale_temporal", type=float, default=None, help="temporal consistency guidance")
336 parser.add_argument("--seed", type=int, default=20230211, help="seed for seed_everything")
337 parser.add_argument("--cond_T", default=800, type=int, help="Steps smaller than cond_T will not contain condition")
338 parser.add_argument("--save_imgs", action='store_true', help="save condition")
339 parser.add_argument("--cond_dir", type=str, default=None, help="condition dir")
340
341 return parser
342
343
344if __name__ == '__main__':

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected