Skip to content

Commit

Permalink
[examples] use from_pretrained to load scheduler (huggingface#1549)
Browse files Browse the repository at this point in the history
us from_pretrained to load scheduler
  • Loading branch information
patil-suraj authored and sliard committed Dec 21, 2022
1 parent 28d8c81 commit a43a7f1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/dreambooth/train_dreambooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def main(args):
eps=args.adam_epsilon,
)

noise_scheduler = DDPMScheduler.from_config(args.pretrained_model_name_or_path, subfolder="scheduler")
noise_scheduler = DDPMScheduler.from_pretrained(args.pretrained_model_name_or_path, subfolder="scheduler")

train_dataset = DreamBoothDataset(
instance_data_root=args.instance_data_dir,
Expand Down
2 changes: 1 addition & 1 deletion examples/dreambooth/train_dreambooth_inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def main():
eps=args.adam_epsilon,
)

noise_scheduler = DDPMScheduler.from_config(args.pretrained_model_name_or_path, subfolder="scheduler")
noise_scheduler = DDPMScheduler.from_pretrained(args.pretrained_model_name_or_path, subfolder="scheduler")

train_dataset = DreamBoothDataset(
instance_data_root=args.instance_data_dir,
Expand Down
2 changes: 1 addition & 1 deletion examples/text_to_image/train_text_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def main():
weight_decay=args.adam_weight_decay,
eps=args.adam_epsilon,
)
noise_scheduler = DDPMScheduler.from_config(args.pretrained_model_name_or_path, subfolder="scheduler")
noise_scheduler = DDPMScheduler.from_pretrained(args.pretrained_model_name_or_path, subfolder="scheduler")

# Get the datasets: you can either provide your own training and evaluation files (see below)
# or specify a Dataset from the hub (the dataset will be downloaded automatically from the datasets Hub).
Expand Down
2 changes: 1 addition & 1 deletion examples/textual_inversion/textual_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def main():
eps=args.adam_epsilon,
)

noise_scheduler = DDPMScheduler.from_config(args.pretrained_model_name_or_path, subfolder="scheduler")
noise_scheduler = DDPMScheduler.from_pretrained(args.pretrained_model_name_or_path, subfolder="scheduler")

train_dataset = TextualInversionDataset(
data_root=args.train_data_dir,
Expand Down

0 comments on commit a43a7f1

Please sign in to comment.