MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / get_args

Function get_args

examples/diffusion/python_stable_diffusion_xl/txt2img.py:56–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55
56def get_args():
57 parser = ArgumentParser()
58 # Model compile
59 parser.add_argument(
60 "--pipeline-type",
61 type=str,
62 choices=["sdxl", "sdxl-opt", "sdxl-turbo"],
63 required=True,
64 help="Specify pipeline type. Options: `sdxl`, `sdxl-opt`, `sdxl-turbo`",
65 )
66
67 parser.add_argument(
68 "--onnx-model-path",
69 type=str,
70 default=None,
71 help=
72 "Path to onnx model files. Use it to override the default models/<sdxl*> path",
73 )
74
75 parser.add_argument(
76 "--compiled-model-path",
77 type=str,
78 default=None,
79 help=
80 "Path to compiled mxr model files. If not set, it will be saved next to the onnx model.",
81 )
82
83 parser.add_argument(
84 "--use-refiner",
85 action="store_true",
86 default=False,
87 help="Use the refiner model",
88 )
89
90 parser.add_argument(
91 "--refiner-onnx-model-path",
92 type=str,
93 default=None,
94 help=
95 "Path to onnx model files. Use it to override the default models/<sdxl*> path",
96 )
97
98 parser.add_argument(
99 "--refiner-compiled-model-path",
100 type=str,
101 default=None,
102 help=
103 "Path to compiled mxr model files. If not set, it will be saved next to the refiner onnx model.",
104 )
105
106 parser.add_argument(
107 "--fp16",
108 choices=[
109 "all", "vae", "clip", "clip2", "unetxl", "refiner_clip2",
110 "refiner_unetxl"
111 ],
112 nargs="+",
113 help="Quantize models with fp16 precision.",

Callers 2

mainFunction · 0.90
txt2img.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected