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
f55190b2
You need to sign in or sign up before continuing.
Unverified
Commit
f55190b2
authored
Sep 08, 2022
by
Patrick von Platen
Committed by
GitHub
Sep 08, 2022
Browse files
[Tests] Correct image folder tests (#427)
* [Tests] Correct image folder tests * up
parent
f8325cfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
tests/test_pipelines.py
tests/test_pipelines.py
+3
-6
No files found.
tests/test_pipelines.py
View file @
f55190b2
...
@@ -1158,11 +1158,10 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -1158,11 +1158,10 @@ class PipelineTesterMixin(unittest.TestCase):
model_id
=
"CompVis/stable-diffusion-v1-4"
model_id
=
"CompVis/stable-diffusion-v1-4"
pipe
=
StableDiffusionImg2ImgPipeline
.
from_pretrained
(
pipe
=
StableDiffusionImg2ImgPipeline
.
from_pretrained
(
model_id
,
model_id
,
revision
=
"fp16"
,
# fp16 to infer 768x512 images with 16GB of VRAM
torch_dtype
=
torch
.
float16
,
use_auth_token
=
True
,
use_auth_token
=
True
,
)
)
pipe
.
to
(
torch_device
)
pipe
.
to
(
torch_device
)
pipe
.
enable_attention_slicing
()
pipe
.
set_progress_bar_config
(
disable
=
None
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
prompt
=
"A fantasy landscape, trending on artstation"
prompt
=
"A fantasy landscape, trending on artstation"
...
@@ -1204,10 +1203,9 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -1204,10 +1203,9 @@ class PipelineTesterMixin(unittest.TestCase):
pipe
=
StableDiffusionImg2ImgPipeline
.
from_pretrained
(
pipe
=
StableDiffusionImg2ImgPipeline
.
from_pretrained
(
model_id
,
model_id
,
scheduler
=
lms
,
scheduler
=
lms
,
revision
=
"fp16"
,
# fp16 to infer 768x512 images with 16GB of VRAM
torch_dtype
=
torch
.
float16
,
use_auth_token
=
True
,
use_auth_token
=
True
,
)
)
pipe
.
enable_attention_slicing
()
pipe
.
to
(
torch_device
)
pipe
.
to
(
torch_device
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
...
@@ -1252,11 +1250,10 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -1252,11 +1250,10 @@ class PipelineTesterMixin(unittest.TestCase):
model_id
=
"CompVis/stable-diffusion-v1-4"
model_id
=
"CompVis/stable-diffusion-v1-4"
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
pipe
=
StableDiffusionInpaintPipeline
.
from_pretrained
(
model_id
,
model_id
,
revision
=
"fp16"
,
# fp16 to infer 768x512 images in 16GB of VRAM
torch_dtype
=
torch
.
float16
,
use_auth_token
=
True
,
use_auth_token
=
True
,
)
)
pipe
.
to
(
torch_device
)
pipe
.
to
(
torch_device
)
pipe
.
enable_attention_slicing
()
pipe
.
set_progress_bar_config
(
disable
=
None
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
prompt
=
"A red cat sitting on a parking bench"
prompt
=
"A red cat sitting on a parking bench"
...
...
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