Skip to content

Commit dafd929

Browse files
committed
add a check of --pretrained_model_name_or_path and --model_config_name_or_path
1 parent 93c62c9 commit dafd929

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/research_projects/autoencoderkl/train_autoencoderkl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ def parse_args(input_args=None):
486486
else:
487487
args = parser.parse_args()
488488

489+
if args.pretrained_model_name_or_path is not None and args.model_config_name_or_path is not None:
490+
raise ValueError("Cannot specify both `--pretrained_model_name_or_path` and `--model_config_name_or_path`")
491+
489492
if args.dataset_name is None and args.train_data_dir is None:
490493
raise ValueError("Specify either `--dataset_name` or `--train_data_dir`")
491494

0 commit comments

Comments
 (0)