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