MCPcopy Create free account
hub / github.com/LuChengTHU/dpm-solver / get_parser

Function get_parser

examples/stable-diffusion/scripts/sample_diffusion.py:162–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160
161
162def get_parser():
163 parser = argparse.ArgumentParser()
164 parser.add_argument(
165 "-r",
166 "--resume",
167 type=str,
168 nargs="?",
169 help="load from logdir or checkpoint in logdir",
170 )
171 parser.add_argument(
172 "-n",
173 "--n_samples",
174 type=int,
175 nargs="?",
176 help="number of samples to draw",
177 default=50000
178 )
179 parser.add_argument(
180 "-e",
181 "--eta",
182 type=float,
183 nargs="?",
184 help="eta for ddim sampling (0.0 yields deterministic sampling)",
185 default=1.0
186 )
187 parser.add_argument(
188 "-v",
189 "--vanilla_sample",
190 default=False,
191 action='store_true',
192 help="vanilla sampling (default option is DDIM sampling)?",
193 )
194 parser.add_argument(
195 "-l",
196 "--logdir",
197 type=str,
198 nargs="?",
199 help="extra logdir",
200 default="none"
201 )
202 parser.add_argument(
203 "-c",
204 "--custom_steps",
205 type=int,
206 nargs="?",
207 help="number of steps for ddim and fastdpm sampling",
208 default=50
209 )
210 parser.add_argument(
211 "--batch_size",
212 type=int,
213 nargs="?",
214 help="the bs",
215 default=10
216 )
217 return parser
218
219

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected