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
35358a2d
Unverified
Commit
35358a2d
authored
May 08, 2024
by
YiYi Xu
Committed by
GitHub
May 08, 2024
Browse files
fix offload test (#7868)
fix Co-authored-by:
Dhruv Nair
<
dhruv.nair@gmail.com
>
parent
818f7607
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/pipelines/test_pipelines_common.py
tests/pipelines/test_pipelines_common.py
+2
-2
No files found.
tests/pipelines/test_pipelines_common.py
View file @
35358a2d
...
@@ -1375,7 +1375,7 @@ class PipelineTesterMixin:
...
@@ -1375,7 +1375,7 @@ class PipelineTesterMixin:
output_without_offload
=
pipe
(
**
inputs
)[
0
]
output_without_offload
=
pipe
(
**
inputs
)[
0
]
pipe
.
enable_sequential_cpu_offload
()
pipe
.
enable_sequential_cpu_offload
()
assert
pipe
.
_execution_device
.
type
==
pipe
.
_offload_device
.
type
assert
pipe
.
_execution_device
.
type
==
"cuda"
inputs
=
self
.
get_dummy_inputs
(
generator_device
)
inputs
=
self
.
get_dummy_inputs
(
generator_device
)
output_with_offload
=
pipe
(
**
inputs
)[
0
]
output_with_offload
=
pipe
(
**
inputs
)[
0
]
...
@@ -1440,7 +1440,7 @@ class PipelineTesterMixin:
...
@@ -1440,7 +1440,7 @@ class PipelineTesterMixin:
output_without_offload
=
pipe
(
**
inputs
)[
0
]
output_without_offload
=
pipe
(
**
inputs
)[
0
]
pipe
.
enable_model_cpu_offload
()
pipe
.
enable_model_cpu_offload
()
assert
pipe
.
_execution_device
.
type
==
pipe
.
_offload_device
.
type
assert
pipe
.
_execution_device
.
type
==
"cuda"
inputs
=
self
.
get_dummy_inputs
(
generator_device
)
inputs
=
self
.
get_dummy_inputs
(
generator_device
)
output_with_offload
=
pipe
(
**
inputs
)[
0
]
output_with_offload
=
pipe
(
**
inputs
)[
0
]
...
...
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