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
OpenDAS
diffusers
Commits
01b6ec21
Unverified
Commit
01b6ec21
authored
Jul 28, 2023
by
Xinyang Li
Committed by
GitHub
Jul 27, 2023
Browse files
fix validation option for dreambooth training example (#4317)
parent
92e5ddd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
examples/dreambooth/train_dreambooth.py
examples/dreambooth/train_dreambooth.py
+2
-1
examples/dreambooth/train_dreambooth_lora.py
examples/dreambooth/train_dreambooth_lora.py
+2
-1
No files found.
examples/dreambooth/train_dreambooth.py
View file @
01b6ec21
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
import
argparse
import
argparse
import
copy
import
gc
import
gc
import
hashlib
import
hashlib
import
itertools
import
itertools
...
@@ -1116,7 +1117,7 @@ def main(args):
...
@@ -1116,7 +1117,7 @@ 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
:
tracker_config
=
vars
(
args
)
tracker_config
=
vars
(
copy
.
deepcopy
(
args
)
)
tracker_config
.
pop
(
"validation_images"
)
tracker_config
.
pop
(
"validation_images"
)
accelerator
.
init_trackers
(
"dreambooth"
,
config
=
tracker_config
)
accelerator
.
init_trackers
(
"dreambooth"
,
config
=
tracker_config
)
...
...
examples/dreambooth/train_dreambooth_lora.py
View file @
01b6ec21
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
import
argparse
import
argparse
import
copy
import
gc
import
gc
import
hashlib
import
hashlib
import
itertools
import
itertools
...
@@ -1067,7 +1068,7 @@ def main(args):
...
@@ -1067,7 +1068,7 @@ 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
:
tracker_config
=
vars
(
args
)
tracker_config
=
vars
(
copy
.
deepcopy
(
args
)
)
tracker_config
.
pop
(
"validation_images"
)
tracker_config
.
pop
(
"validation_images"
)
accelerator
.
init_trackers
(
"dreambooth-lora"
,
config
=
tracker_config
)
accelerator
.
init_trackers
(
"dreambooth-lora"
,
config
=
tracker_config
)
...
...
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