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
d08ad658
Unverified
Commit
d08ad658
authored
Sep 09, 2024
by
Sayak Paul
Committed by
GitHub
Sep 09, 2024
Browse files
modify benchmarks to replace sdv1.5 with dreamshaper. (#9334)
parent
8cdcdd9e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
+12
-11
benchmarks/base_classes.py
benchmarks/base_classes.py
+3
-3
benchmarks/benchmark_ip_adapters.py
benchmarks/benchmark_ip_adapters.py
+3
-2
benchmarks/benchmark_sd_img.py
benchmarks/benchmark_sd_img.py
+2
-2
benchmarks/benchmark_sd_inpainting.py
benchmarks/benchmark_sd_inpainting.py
+2
-2
benchmarks/benchmark_text_to_image.py
benchmarks/benchmark_text_to_image.py
+2
-2
No files found.
benchmarks/base_classes.py
View file @
d08ad658
...
@@ -34,7 +34,7 @@ from utils import ( # noqa: E402
...
@@ -34,7 +34,7 @@ from utils import ( # noqa: E402
RESOLUTION_MAPPING
=
{
RESOLUTION_MAPPING
=
{
"
runwayml/stable-diffusion-v1-5
"
:
(
512
,
512
),
"
Lykon/DreamShaper
"
:
(
512
,
512
),
"lllyasviel/sd-controlnet-canny"
:
(
512
,
512
),
"lllyasviel/sd-controlnet-canny"
:
(
512
,
512
),
"diffusers/controlnet-canny-sdxl-1.0"
:
(
1024
,
1024
),
"diffusers/controlnet-canny-sdxl-1.0"
:
(
1024
,
1024
),
"TencentARC/t2iadapter_canny_sd14v1"
:
(
512
,
512
),
"TencentARC/t2iadapter_canny_sd14v1"
:
(
512
,
512
),
...
@@ -268,7 +268,7 @@ class IPAdapterTextToImageBenchmark(TextToImageBenchmark):
...
@@ -268,7 +268,7 @@ class IPAdapterTextToImageBenchmark(TextToImageBenchmark):
class
ControlNetBenchmark
(
TextToImageBenchmark
):
class
ControlNetBenchmark
(
TextToImageBenchmark
):
pipeline_class
=
StableDiffusionControlNetPipeline
pipeline_class
=
StableDiffusionControlNetPipeline
aux_network_class
=
ControlNetModel
aux_network_class
=
ControlNetModel
root_ckpt
=
"
runwayml/stable-diffusion-v1-5
"
root_ckpt
=
"
Lykon/DreamShaper
"
url
=
"https://huggingface.co/datasets/diffusers/docs-images/resolve/main/benchmarking/canny_image_condition.png"
url
=
"https://huggingface.co/datasets/diffusers/docs-images/resolve/main/benchmarking/canny_image_condition.png"
image
=
load_image
(
url
).
convert
(
"RGB"
)
image
=
load_image
(
url
).
convert
(
"RGB"
)
...
@@ -311,7 +311,7 @@ class ControlNetSDXLBenchmark(ControlNetBenchmark):
...
@@ -311,7 +311,7 @@ class ControlNetSDXLBenchmark(ControlNetBenchmark):
class
T2IAdapterBenchmark
(
ControlNetBenchmark
):
class
T2IAdapterBenchmark
(
ControlNetBenchmark
):
pipeline_class
=
StableDiffusionAdapterPipeline
pipeline_class
=
StableDiffusionAdapterPipeline
aux_network_class
=
T2IAdapter
aux_network_class
=
T2IAdapter
root_ckpt
=
"
CompVis/stable-diffusion-v1-4
"
root_ckpt
=
"
Lykon/DreamShaper
"
url
=
"https://huggingface.co/datasets/diffusers/docs-images/resolve/main/benchmarking/canny_for_adapter.png"
url
=
"https://huggingface.co/datasets/diffusers/docs-images/resolve/main/benchmarking/canny_for_adapter.png"
image
=
load_image
(
url
).
convert
(
"L"
)
image
=
load_image
(
url
).
convert
(
"L"
)
...
...
benchmarks/benchmark_ip_adapters.py
View file @
d08ad658
...
@@ -7,7 +7,8 @@ from base_classes import IPAdapterTextToImageBenchmark # noqa: E402
...
@@ -7,7 +7,8 @@ from base_classes import IPAdapterTextToImageBenchmark # noqa: E402
IP_ADAPTER_CKPTS
=
{
IP_ADAPTER_CKPTS
=
{
"runwayml/stable-diffusion-v1-5"
:
(
"h94/IP-Adapter"
,
"ip-adapter_sd15.bin"
),
# because original SD v1.5 has been taken down.
"Lykon/DreamShaper"
:
(
"h94/IP-Adapter"
,
"ip-adapter_sd15.bin"
),
"stabilityai/stable-diffusion-xl-base-1.0"
:
(
"h94/IP-Adapter"
,
"ip-adapter_sdxl.bin"
),
"stabilityai/stable-diffusion-xl-base-1.0"
:
(
"h94/IP-Adapter"
,
"ip-adapter_sdxl.bin"
),
}
}
...
@@ -17,7 +18,7 @@ if __name__ == "__main__":
...
@@ -17,7 +18,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
parser
.
add_argument
(
"--ckpt"
,
"--ckpt"
,
type
=
str
,
type
=
str
,
default
=
"r
unwayml
/stable-diffusion-
v1-5
"
,
default
=
"r
stabilityai
/stable-diffusion-
xl-base-1.0
"
,
choices
=
list
(
IP_ADAPTER_CKPTS
.
keys
()),
choices
=
list
(
IP_ADAPTER_CKPTS
.
keys
()),
)
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
1
)
...
...
benchmarks/benchmark_sd_img.py
View file @
d08ad658
...
@@ -11,9 +11,9 @@ if __name__ == "__main__":
...
@@ -11,9 +11,9 @@ if __name__ == "__main__":
parser
.
add_argument
(
parser
.
add_argument
(
"--ckpt"
,
"--ckpt"
,
type
=
str
,
type
=
str
,
default
=
"
runwayml/stable-diffusion-v1-5
"
,
default
=
"
Lykon/DreamShaper
"
,
choices
=
[
choices
=
[
"
runwayml/stable-diffusion-v1-5
"
,
"
Lykon/DreamShaper
"
,
"stabilityai/stable-diffusion-2-1"
,
"stabilityai/stable-diffusion-2-1"
,
"stabilityai/stable-diffusion-xl-refiner-1.0"
,
"stabilityai/stable-diffusion-xl-refiner-1.0"
,
"stabilityai/sdxl-turbo"
,
"stabilityai/sdxl-turbo"
,
...
...
benchmarks/benchmark_sd_inpainting.py
View file @
d08ad658
...
@@ -11,9 +11,9 @@ if __name__ == "__main__":
...
@@ -11,9 +11,9 @@ if __name__ == "__main__":
parser
.
add_argument
(
parser
.
add_argument
(
"--ckpt"
,
"--ckpt"
,
type
=
str
,
type
=
str
,
default
=
"
runwayml/stable-diffusion-v1-5
"
,
default
=
"
Lykon/DreamShaper
"
,
choices
=
[
choices
=
[
"
runwayml/stable-diffusion-v1-5
"
,
"
Lykon/DreamShaper
"
,
"stabilityai/stable-diffusion-2-1"
,
"stabilityai/stable-diffusion-2-1"
,
"stabilityai/stable-diffusion-xl-base-1.0"
,
"stabilityai/stable-diffusion-xl-base-1.0"
,
],
],
...
...
benchmarks/benchmark_text_to_image.py
View file @
d08ad658
...
@@ -7,7 +7,7 @@ from base_classes import TextToImageBenchmark, TurboTextToImageBenchmark # noqa
...
@@ -7,7 +7,7 @@ from base_classes import TextToImageBenchmark, TurboTextToImageBenchmark # noqa
ALL_T2I_CKPTS
=
[
ALL_T2I_CKPTS
=
[
"
runwayml/stable-diffusion-v1-5
"
,
"
Lykon/DreamShaper
"
,
"segmind/SSD-1B"
,
"segmind/SSD-1B"
,
"stabilityai/stable-diffusion-xl-base-1.0"
,
"stabilityai/stable-diffusion-xl-base-1.0"
,
"kandinsky-community/kandinsky-2-2-decoder"
,
"kandinsky-community/kandinsky-2-2-decoder"
,
...
@@ -21,7 +21,7 @@ if __name__ == "__main__":
...
@@ -21,7 +21,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
parser
.
add_argument
(
"--ckpt"
,
"--ckpt"
,
type
=
str
,
type
=
str
,
default
=
"
runwayml/stable-diffusion-v1-5
"
,
default
=
"
Lykon/DreamShaper
"
,
choices
=
ALL_T2I_CKPTS
,
choices
=
ALL_T2I_CKPTS
,
)
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
1
)
...
...
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