MCPcopy Create free account
hub / github.com/ChenWu98/cycle-diffusion / get_parser

Function get_parser

model/lib/latentdiff/sample_diffusion.py:159–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

prepare_latentdiffFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected