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
dc87f526
Unverified
Commit
dc87f526
authored
Dec 07, 2022
by
Anton Lozhkov
Committed by
GitHub
Dec 07, 2022
Browse files
Fix common tests for FP16 (#1588)
* Fix common tests for FP16 * revert
parent
d9b5b43d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
tests/pipelines/ddim/test_ddim.py
tests/pipelines/ddim/test_ddim.py
+1
-0
tests/test_pipelines_common.py
tests/test_pipelines_common.py
+1
-1
No files found.
tests/pipelines/ddim/test_ddim.py
View file @
dc87f526
...
@@ -29,6 +29,7 @@ torch.backends.cuda.matmul.allow_tf32 = False
...
@@ -29,6 +29,7 @@ torch.backends.cuda.matmul.allow_tf32 = False
class
DDIMPipelineFastTests
(
PipelineTesterMixin
,
unittest
.
TestCase
):
class
DDIMPipelineFastTests
(
PipelineTesterMixin
,
unittest
.
TestCase
):
pipeline_class
=
DDIMPipeline
pipeline_class
=
DDIMPipeline
test_cpu_offload
=
False
def
get_dummy_components
(
self
):
def
get_dummy_components
(
self
):
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
0
)
...
...
tests/test_pipelines_common.py
View file @
dc87f526
...
@@ -190,7 +190,7 @@ class PipelineTesterMixin:
...
@@ -190,7 +190,7 @@ class PipelineTesterMixin:
with
tempfile
.
TemporaryDirectory
()
as
tmpdir
:
with
tempfile
.
TemporaryDirectory
()
as
tmpdir
:
pipe
.
save_pretrained
(
tmpdir
)
pipe
.
save_pretrained
(
tmpdir
)
pipe_loaded
=
self
.
pipeline_class
.
from_pretrained
(
tmpdir
)
pipe_loaded
=
self
.
pipeline_class
.
from_pretrained
(
tmpdir
,
torch_dtype
=
torch
.
float16
)
pipe_loaded
.
to
(
torch_device
)
pipe_loaded
.
to
(
torch_device
)
pipe_loaded
.
set_progress_bar_config
(
disable
=
None
)
pipe_loaded
.
set_progress_bar_config
(
disable
=
None
)
...
...
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