Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
634be6e5
Unverified
Commit
634be6e5
authored
Dec 05, 2022
by
Suraj Patil
Committed by
GitHub
Dec 05, 2022
Browse files
[examples] use from_pretrained to load scheduler (#1549)
us from_pretrained to load scheduler
parent
d1bcbf38
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
examples/dreambooth/train_dreambooth.py
examples/dreambooth/train_dreambooth.py
+1
-1
examples/dreambooth/train_dreambooth_inpaint.py
examples/dreambooth/train_dreambooth_inpaint.py
+1
-1
examples/text_to_image/train_text_to_image.py
examples/text_to_image/train_text_to_image.py
+1
-1
examples/textual_inversion/textual_inversion.py
examples/textual_inversion/textual_inversion.py
+1
-1
No files found.
examples/dreambooth/train_dreambooth.py
View file @
634be6e5
...
...
@@ -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
,
...
...
examples/dreambooth/train_dreambooth_inpaint.py
View file @
634be6e5
...
...
@@ -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
,
...
...
examples/text_to_image/train_text_to_image.py
View file @
634be6e5
...
...
@@ -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).
...
...
examples/textual_inversion/textual_inversion.py
View file @
634be6e5
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment