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
eb5267f3
Commit
eb5267f3
authored
Aug 22, 2022
by
anton-l
Browse files
Style quickfix
parent
db5fa430
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/diffusers/modeling_utils.py
src/diffusers/modeling_utils.py
+3
-1
No files found.
src/diffusers/modeling_utils.py
View file @
eb5267f3
...
@@ -337,7 +337,9 @@ class ModelMixin(torch.nn.Module):
...
@@ -337,7 +337,9 @@ class ModelMixin(torch.nn.Module):
)
)
if
torch_dtype
is
not
None
and
not
isinstance
(
torch_dtype
,
torch
.
dtype
):
if
torch_dtype
is
not
None
and
not
isinstance
(
torch_dtype
,
torch
.
dtype
):
raise
ValueError
(
f
"
{
torch_dtype
}
needs to be of type `torch.dtype`, e.g. `torch.float16`, but is
{
type
(
torch_dtype
)
}
."
)
raise
ValueError
(
f
"
{
torch_dtype
}
needs to be of type `torch.dtype`, e.g. `torch.float16`, but is
{
type
(
torch_dtype
)
}
."
)
elif
torch_dtype
is
not
None
:
elif
torch_dtype
is
not
None
:
model
=
model
.
to
(
torch_dtype
)
model
=
model
.
to
(
torch_dtype
)
...
...
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