MCPcopy Index your code
hub / github.com/huggingface/diffusers / parse_args

Function parse_args

examples/custom_diffusion/train_custom_diffusion.py:327–660  ·  view source on GitHub ↗
(input_args=None)

Source from the content-addressed store, hash-verified

325
326
327def parse_args(input_args=None):
328 parser = argparse.ArgumentParser(description="Custom Diffusion training script.")
329 parser.add_argument(
330 "--pretrained_model_name_or_path",
331 type=str,
332 default=None,
333 required=True,
334 help="Path to pretrained model or model identifier from huggingface.co/models.",
335 )
336 parser.add_argument(
337 "--revision",
338 type=str,
339 default=None,
340 required=False,
341 help="Revision of pretrained model identifier from huggingface.co/models.",
342 )
343 parser.add_argument(
344 "--variant",
345 type=str,
346 default=None,
347 help="Variant of the model files of the pretrained model identifier from huggingface.co/models, 'e.g.' fp16",
348 )
349 parser.add_argument(
350 "--tokenizer_name",
351 type=str,
352 default=None,
353 help="Pretrained tokenizer name or path if not the same as model_name",
354 )
355 parser.add_argument(
356 "--instance_data_dir",
357 type=str,
358 default=None,
359 help="A folder containing the training data of instance images.",
360 )
361 parser.add_argument(
362 "--class_data_dir",
363 type=str,
364 default=None,
365 help="A folder containing the training data of class images.",
366 )
367 parser.add_argument(
368 "--instance_prompt",
369 type=str,
370 default=None,
371 help="The prompt with identifier specifying the instance",
372 )
373 parser.add_argument(
374 "--class_prompt",
375 type=str,
376 default=None,
377 help="The prompt to specify images in the same class as provided instance images.",
378 )
379 parser.add_argument(
380 "--validation_prompt",
381 type=str,
382 default=None,
383 help="A prompt that is used during validation to verify that the model is learning.",
384 )

Callers 1

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…