Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
3dd33937
Unverified
Commit
3dd33937
authored
Jul 24, 2023
by
Will Berman
Committed by
GitHub
Jul 24, 2023
Browse files
do not pass list to accelerator.init_trackers (#4248)
parent
5652c43f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
examples/dreambooth/train_dreambooth.py
examples/dreambooth/train_dreambooth.py
+3
-1
examples/dreambooth/train_dreambooth_lora.py
examples/dreambooth/train_dreambooth_lora.py
+3
-1
No files found.
examples/dreambooth/train_dreambooth.py
View file @
3dd33937
...
@@ -1116,7 +1116,9 @@ def main(args):
...
@@ -1116,7 +1116,9 @@ def main(args):
# We need to initialize the trackers we use, and also store our configuration.
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
# The trackers initializes automatically on the main process.
if
accelerator
.
is_main_process
:
if
accelerator
.
is_main_process
:
accelerator
.
init_trackers
(
"dreambooth"
,
config
=
vars
(
args
))
tracker_config
=
vars
(
args
)
tracker_config
.
pop
(
"validation_images"
)
accelerator
.
init_trackers
(
"dreambooth"
,
config
=
tracker_config
)
# Train!
# Train!
total_batch_size
=
args
.
train_batch_size
*
accelerator
.
num_processes
*
args
.
gradient_accumulation_steps
total_batch_size
=
args
.
train_batch_size
*
accelerator
.
num_processes
*
args
.
gradient_accumulation_steps
...
...
examples/dreambooth/train_dreambooth_lora.py
View file @
3dd33937
...
@@ -1067,7 +1067,9 @@ def main(args):
...
@@ -1067,7 +1067,9 @@ def main(args):
# We need to initialize the trackers we use, and also store our configuration.
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
# The trackers initializes automatically on the main process.
if
accelerator
.
is_main_process
:
if
accelerator
.
is_main_process
:
accelerator
.
init_trackers
(
"dreambooth-lora"
,
config
=
vars
(
args
))
tracker_config
=
vars
(
args
)
tracker_config
.
pop
(
"validation_images"
)
accelerator
.
init_trackers
(
"dreambooth-lora"
,
config
=
tracker_config
)
# Train!
# Train!
total_batch_size
=
args
.
train_batch_size
*
accelerator
.
num_processes
*
args
.
gradient_accumulation_steps
total_batch_size
=
args
.
train_batch_size
*
accelerator
.
num_processes
*
args
.
gradient_accumulation_steps
...
...
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