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
1d50f47a
Commit
1d50f47a
authored
Jun 10, 2023
by
Patrick von Platen
Browse files
Merge branch 'main' of
https://github.com/huggingface/diffusers
parents
e891b00d
05361960
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
tests/pipelines/test_pipelines.py
tests/pipelines/test_pipelines.py
+0
-21
No files found.
tests/pipelines/test_pipelines.py
View file @
1d50f47a
...
@@ -244,27 +244,6 @@ class DownloadTests(unittest.TestCase):
...
@@ -244,27 +244,6 @@ class DownloadTests(unittest.TestCase):
use_safetensors
=
True
,
use_safetensors
=
True
,
)
)
def
test_returned_cached_folder
(
self
):
prompt
=
"hello"
pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"hf-internal-testing/tiny-stable-diffusion-torch"
,
safety_checker
=
None
)
_
,
local_path
=
StableDiffusionPipeline
.
from_pretrained
(
"hf-internal-testing/tiny-stable-diffusion-torch"
,
safety_checker
=
None
,
return_cached_folder
=
True
)
pipe_2
=
StableDiffusionPipeline
.
from_pretrained
(
local_path
)
pipe
=
pipe
.
to
(
torch_device
)
pipe_2
=
pipe_2
.
to
(
torch_device
)
generator
=
torch
.
manual_seed
(
0
)
out
=
pipe
(
prompt
,
num_inference_steps
=
2
,
generator
=
generator
,
output_type
=
"numpy"
).
images
generator
=
torch
.
manual_seed
(
0
)
out_2
=
pipe_2
(
prompt
,
num_inference_steps
=
2
,
generator
=
generator
,
output_type
=
"numpy"
).
images
assert
np
.
max
(
np
.
abs
(
out
-
out_2
))
<
1e-3
def
test_download_safetensors
(
self
):
def
test_download_safetensors
(
self
):
with
tempfile
.
TemporaryDirectory
()
as
tmpdirname
:
with
tempfile
.
TemporaryDirectory
()
as
tmpdirname
:
# pipeline has Flax weights
# pipeline has Flax weights
...
...
Prev
1
2
Next
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