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
ColossalAI
Commits
cfd1d5ee
Unverified
Commit
cfd1d5ee
authored
Jan 11, 2023
by
Haofan Wang
Committed by
GitHub
Jan 11, 2023
Browse files
[example] fixed seed error in train_dreambooth_colossalai.py (#2445)
parent
ac18a445
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
examples/images/dreambooth/train_dreambooth_colossalai.py
examples/images/dreambooth/train_dreambooth_colossalai.py
+4
-3
No files found.
examples/images/dreambooth/train_dreambooth_colossalai.py
View file @
cfd1d5ee
...
@@ -355,10 +355,11 @@ def gemini_zero_dpp(model: torch.nn.Module, placememt_policy: str = "auto"):
...
@@ -355,10 +355,11 @@ def gemini_zero_dpp(model: torch.nn.Module, placememt_policy: str = "auto"):
def
main
(
args
):
def
main
(
args
):
colossalai
.
launch_from_torch
(
config
=
{})
if
args
.
seed
is
not
None
:
if
args
.
seed
is
None
:
gpc
.
set_seed
(
args
.
seed
)
colossalai
.
launch_from_torch
(
config
=
{})
else
:
colossalai
.
launch_from_torch
(
config
=
{},
seed
=
args
.
seed
)
if
args
.
with_prior_preservation
:
if
args
.
with_prior_preservation
:
class_images_dir
=
Path
(
args
.
class_data_dir
)
class_images_dir
=
Path
(
args
.
class_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