MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / parse_args

Function parse_args

diffusers/examples/vqgan/train_vqgan.py:203–545  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201
202
203def parse_args():
204 parser = argparse.ArgumentParser(description="Simple example of a training script.")
205 parser.add_argument(
206 "--log_grad_norm_steps",
207 type=int,
208 default=500,
209 help=("Print logs of gradient norms every X steps."),
210 )
211 parser.add_argument(
212 "--log_steps",
213 type=int,
214 default=50,
215 help=("Print logs every X steps."),
216 )
217 parser.add_argument(
218 "--validation_steps",
219 type=int,
220 default=100,
221 help=(
222 "Run validation every X steps. Validation consists of running reconstruction on images in"
223 " `args.validation_images` and logging the reconstructed images."
224 ),
225 )
226 parser.add_argument(
227 "--vae_loss",
228 type=str,
229 default="l2",
230 help="The loss function for vae reconstruction loss.",
231 )
232 parser.add_argument(
233 "--timm_model_offset",
234 type=int,
235 default=0,
236 help="Offset of timm layers to indices.",
237 )
238 parser.add_argument(
239 "--timm_model_layers",
240 type=str,
241 default="head",
242 help="The layers to get output from in the timm model.",
243 )
244 parser.add_argument(
245 "--timm_model_backend",
246 type=str,
247 default="vgg19",
248 help="Timm model used to get the lpips loss",
249 )
250 parser.add_argument(
251 "--pretrained_model_name_or_path",
252 type=str,
253 default=None,
254 help="Path to pretrained model or model identifier from huggingface.co/models.",
255 )
256 parser.add_argument(
257 "--model_config_name_or_path",
258 type=str,
259 default=None,
260 help="The config of the Vq model to train, leave as None to use standard Vq model configuration.",

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected