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
318556b2
Unverified
Commit
318556b2
authored
Jan 22, 2024
by
YiYi Xu
Committed by
GitHub
Jan 22, 2024
Browse files
fix dpm related slow test failure (#6680)
fix Co-authored-by:
yiyixuxu
<
yixu310@gmail,com
>
parent
6620eda3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
tests/pipelines/stable_diffusion/test_stable_diffusion.py
tests/pipelines/stable_diffusion/test_stable_diffusion.py
+4
-1
tests/pipelines/stable_diffusion_2/test_stable_diffusion.py
tests/pipelines/stable_diffusion_2/test_stable_diffusion.py
+3
-1
tests/pipelines/stable_diffusion_2/test_stable_diffusion_v_pred.py
...elines/stable_diffusion_2/test_stable_diffusion_v_pred.py
+3
-1
No files found.
tests/pipelines/stable_diffusion/test_stable_diffusion.py
View file @
318556b2
...
@@ -836,7 +836,10 @@ class StableDiffusionPipelineSlowTests(unittest.TestCase):
...
@@ -836,7 +836,10 @@ class StableDiffusionPipelineSlowTests(unittest.TestCase):
def
test_stable_diffusion_dpm
(
self
):
def
test_stable_diffusion_dpm
(
self
):
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"CompVis/stable-diffusion-v1-4"
,
safety_checker
=
None
)
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"CompVis/stable-diffusion-v1-4"
,
safety_checker
=
None
)
sd_pipe
.
scheduler
=
DPMSolverMultistepScheduler
.
from_config
(
sd_pipe
.
scheduler
.
config
)
sd_pipe
.
scheduler
=
DPMSolverMultistepScheduler
.
from_config
(
sd_pipe
.
scheduler
.
config
,
final_sigmas_type
=
"sigma_min"
,
)
sd_pipe
=
sd_pipe
.
to
(
torch_device
)
sd_pipe
=
sd_pipe
.
to
(
torch_device
)
sd_pipe
.
set_progress_bar_config
(
disable
=
None
)
sd_pipe
.
set_progress_bar_config
(
disable
=
None
)
...
...
tests/pipelines/stable_diffusion_2/test_stable_diffusion.py
View file @
318556b2
...
@@ -627,7 +627,9 @@ class StableDiffusion2PipelineNightlyTests(unittest.TestCase):
...
@@ -627,7 +627,9 @@ class StableDiffusion2PipelineNightlyTests(unittest.TestCase):
def
test_stable_diffusion_dpm
(
self
):
def
test_stable_diffusion_dpm
(
self
):
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"stabilityai/stable-diffusion-2-1-base"
).
to
(
torch_device
)
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"stabilityai/stable-diffusion-2-1-base"
).
to
(
torch_device
)
sd_pipe
.
scheduler
=
DPMSolverMultistepScheduler
.
from_config
(
sd_pipe
.
scheduler
.
config
)
sd_pipe
.
scheduler
=
DPMSolverMultistepScheduler
.
from_config
(
sd_pipe
.
scheduler
.
config
,
final_sigmas_type
=
"sigma_min"
)
sd_pipe
.
set_progress_bar_config
(
disable
=
None
)
sd_pipe
.
set_progress_bar_config
(
disable
=
None
)
inputs
=
self
.
get_inputs
(
torch_device
)
inputs
=
self
.
get_inputs
(
torch_device
)
...
...
tests/pipelines/stable_diffusion_2/test_stable_diffusion_v_pred.py
View file @
318556b2
...
@@ -323,7 +323,9 @@ class StableDiffusion2VPredictionPipelineIntegrationTests(unittest.TestCase):
...
@@ -323,7 +323,9 @@ class StableDiffusion2VPredictionPipelineIntegrationTests(unittest.TestCase):
TODO: update this test after making DPM compatible with V-prediction!
TODO: update this test after making DPM compatible with V-prediction!
"""
"""
scheduler
=
DPMSolverMultistepScheduler
.
from_pretrained
(
scheduler
=
DPMSolverMultistepScheduler
.
from_pretrained
(
"stabilityai/stable-diffusion-2"
,
subfolder
=
"scheduler"
"stabilityai/stable-diffusion-2"
,
subfolder
=
"scheduler"
,
final_sigmas_type
=
"sigma_min"
,
)
)
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"stabilityai/stable-diffusion-2"
,
scheduler
=
scheduler
)
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"stabilityai/stable-diffusion-2"
,
scheduler
=
scheduler
)
sd_pipe
=
sd_pipe
.
to
(
torch_device
)
sd_pipe
=
sd_pipe
.
to
(
torch_device
)
...
...
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