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
f1a32203
"git@developer.sourcefind.cn:OpenDAS/lmdeploy.git" did not exist on "414bc34c4d4c23a5ae0eef17502a59c3eba8fe56"
Unverified
Commit
f1a32203
authored
Dec 19, 2022
by
Anton Lozhkov
Committed by
GitHub
Dec 19, 2022
Browse files
[Tests] Fix UnCLIP cpu offload tests (#1769)
parent
6f150263
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests/pipelines/unclip/test_unclip.py
tests/pipelines/unclip/test_unclip.py
+3
-3
No files found.
tests/pipelines/unclip/test_unclip.py
View file @
f1a32203
...
@@ -286,7 +286,7 @@ class UnCLIPPipelineIntegrationTests(unittest.TestCase):
...
@@ -286,7 +286,7 @@ class UnCLIPPipelineIntegrationTests(unittest.TestCase):
torch
.
cuda
.
reset_max_memory_allocated
()
torch
.
cuda
.
reset_max_memory_allocated
()
torch
.
cuda
.
reset_peak_memory_stats
()
torch
.
cuda
.
reset_peak_memory_stats
()
pipe
=
UnCLIPPipeline
.
from_pretrained
(
"kakaobrain/karlo-v1-alpha"
)
pipe
=
UnCLIPPipeline
.
from_pretrained
(
"kakaobrain/karlo-v1-alpha"
,
torch_dtype
=
torch
.
float16
)
pipe
=
pipe
.
to
(
torch_device
)
pipe
=
pipe
.
to
(
torch_device
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
pipe
.
enable_attention_slicing
()
pipe
.
enable_attention_slicing
()
...
@@ -304,5 +304,5 @@ class UnCLIPPipelineIntegrationTests(unittest.TestCase):
...
@@ -304,5 +304,5 @@ class UnCLIPPipelineIntegrationTests(unittest.TestCase):
)
)
mem_bytes
=
torch
.
cuda
.
max_memory_allocated
()
mem_bytes
=
torch
.
cuda
.
max_memory_allocated
()
# make sure that less than
1.5
GB is allocated
# make sure that less than
7
GB is allocated
assert
mem_bytes
<
1.5
*
10
**
9
assert
mem_bytes
<
7
*
10
**
9
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