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
46557121
You need to sign in or sign up before continuing.
Unverified
Commit
46557121
authored
Oct 19, 2022
by
Patrick von Platen
Committed by
GitHub
Oct 19, 2022
Browse files
finish tests (#909)
parent
b35d88c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/test_pipelines.py
tests/test_pipelines.py
+4
-4
No files found.
tests/test_pipelines.py
View file @
46557121
...
@@ -2013,7 +2013,7 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -2013,7 +2013,7 @@ class PipelineTesterMixin(unittest.TestCase):
)
)
expected_image
=
np
.
array
(
expected_image
,
dtype
=
np
.
float32
)
/
255.0
expected_image
=
np
.
array
(
expected_image
,
dtype
=
np
.
float32
)
/
255.0
model_id
=
"
fusing/sd
-inpaint
-temp
"
model_id
=
"
runwayml/stable-diffusion
-inpaint
ing
"
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
model_id
,
model_id
,
safety_checker
=
self
.
dummy_safety_checker
,
safety_checker
=
self
.
dummy_safety_checker
,
...
@@ -2050,11 +2050,11 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -2050,11 +2050,11 @@ class PipelineTesterMixin(unittest.TestCase):
)
)
expected_image
=
load_image
(
expected_image
=
load_image
(
"https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
"https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
"/in_paint/yellow_cat_sitting_on_a_park_bench.png"
"/in_paint/yellow_cat_sitting_on_a_park_bench
_fp16
.png"
)
)
expected_image
=
np
.
array
(
expected_image
,
dtype
=
np
.
float32
)
/
255.0
expected_image
=
np
.
array
(
expected_image
,
dtype
=
np
.
float32
)
/
255.0
model_id
=
"
fusing/sd
-inpaint
-temp
"
model_id
=
"
runwayml/stable-diffusion
-inpaint
ing
"
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
model_id
,
model_id
,
revision
=
"fp16"
,
revision
=
"fp16"
,
...
@@ -2141,7 +2141,7 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -2141,7 +2141,7 @@ class PipelineTesterMixin(unittest.TestCase):
expected_image
=
np
.
array
(
expected_image
,
dtype
=
np
.
float32
)
/
255.0
expected_image
=
np
.
array
(
expected_image
,
dtype
=
np
.
float32
)
/
255.0
pndm
=
PNDMScheduler
(
beta_start
=
0.00085
,
beta_end
=
0.012
,
beta_schedule
=
"scaled_linear"
,
skip_prk_steps
=
True
)
pndm
=
PNDMScheduler
(
beta_start
=
0.00085
,
beta_end
=
0.012
,
beta_schedule
=
"scaled_linear"
,
skip_prk_steps
=
True
)
model_id
=
"
fusing/sd
-inpaint
-temp
"
model_id
=
"
runwayml/stable-diffusion
-inpaint
ing
"
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
model_id
,
safety_checker
=
self
.
dummy_safety_checker
,
scheduler
=
pndm
model_id
,
safety_checker
=
self
.
dummy_safety_checker
,
scheduler
=
pndm
)
)
...
...
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