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
OpenDAS
diffusers
Commits
ab785701
Unverified
Commit
ab785701
authored
Aug 31, 2022
by
Anton Lozhkov
Committed by
GitHub
Aug 31, 2022
Browse files
Add missing auth tokens for two SD tests (#296)
parent
c7a3b2ed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
.github/workflows/push_tests.yml
.github/workflows/push_tests.yml
+1
-1
tests/test_pipelines.py
tests/test_pipelines.py
+4
-2
No files found.
.github/workflows/push_tests.yml
View file @
ab785701
...
@@ -47,6 +47,6 @@ jobs:
...
@@ -47,6 +47,6 @@ jobs:
-
name
:
Run all (incl. slow) tests on GPU
-
name
:
Run all (incl. slow) tests on GPU
env
:
env
:
H
F_API
_TOKEN
:
${{ secrets.H
F_API
_TOKEN }}
H
UGGING_FACE_HUB
_TOKEN
:
${{ secrets.H
UGGING_FACE_HUB
_TOKEN }}
run
:
|
run
:
|
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s tests/
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s tests/
tests/test_pipelines.py
View file @
ab785701
...
@@ -275,7 +275,8 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -275,7 +275,8 @@ class PipelineTesterMixin(unittest.TestCase):
@
unittest
.
skipIf
(
torch_device
==
"cpu"
,
"Stable diffusion is supposed to run on GPU"
)
@
unittest
.
skipIf
(
torch_device
==
"cpu"
,
"Stable diffusion is supposed to run on GPU"
)
def
test_stable_diffusion
(
self
):
def
test_stable_diffusion
(
self
):
# make sure here that pndm scheduler skips prk
# make sure here that pndm scheduler skips prk
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"CompVis/stable-diffusion-v1-1"
).
to
(
torch_device
)
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"CompVis/stable-diffusion-v1-1"
,
use_auth_token
=
True
)
sd_pipe
=
sd_pipe
.
to
(
torch_device
)
prompt
=
"A painting of a squirrel eating a burger"
prompt
=
"A painting of a squirrel eating a burger"
generator
=
torch
.
Generator
(
device
=
torch_device
).
manual_seed
(
0
)
generator
=
torch
.
Generator
(
device
=
torch_device
).
manual_seed
(
0
)
...
@@ -295,7 +296,8 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -295,7 +296,8 @@ class PipelineTesterMixin(unittest.TestCase):
@
slow
@
slow
@
unittest
.
skipIf
(
torch_device
==
"cpu"
,
"Stable diffusion is supposed to run on GPU"
)
@
unittest
.
skipIf
(
torch_device
==
"cpu"
,
"Stable diffusion is supposed to run on GPU"
)
def
test_stable_diffusion_fast_ddim
(
self
):
def
test_stable_diffusion_fast_ddim
(
self
):
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"CompVis/stable-diffusion-v1-1"
).
to
(
torch_device
)
sd_pipe
=
StableDiffusionPipeline
.
from_pretrained
(
"CompVis/stable-diffusion-v1-1"
,
use_auth_token
=
True
)
sd_pipe
=
sd_pipe
.
to
(
torch_device
)
scheduler
=
DDIMScheduler
(
scheduler
=
DDIMScheduler
(
beta_start
=
0.00085
,
beta_start
=
0.00085
,
...
...
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