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
chenpangpang
ComfyUI
Commits
f3246393
Commit
f3246393
authored
Sep 18, 2023
by
comfyanonymous
Browse files
Unhardcode sampler and scheduler list in test.
parent
7c93afd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
tests/inference/test_inference.py
tests/inference/test_inference.py
+6
-14
No files found.
tests/inference/test_inference.py
View file @
f3246393
...
@@ -16,10 +16,8 @@ import uuid
...
@@ -16,10 +16,8 @@ import uuid
import
urllib.request
import
urllib.request
import
urllib.parse
import
urllib.parse
# Currently causes an error when running pytest with built-in pytest args
# TODO: modify cli_args.py to not parse args on import
from
comfy.samplers
import
KSampler
# We will hard-code sampler and scheduler lists for now
# from comfy.samplers import KSampler
"""
"""
These tests generate and save images through a range of parameters
These tests generate and save images through a range of parameters
...
@@ -140,16 +138,10 @@ comfy_graph_ids = [DEFAULT_COMFY_GRAPH_ID]
...
@@ -140,16 +138,10 @@ comfy_graph_ids = [DEFAULT_COMFY_GRAPH_ID]
prompt_list
=
[
prompt_list
=
[
'a painting of a cat'
,
'a painting of a cat'
,
]
]
#TODO use sampler and scheduler list from comfy.samplers.KSampler
# sampler_list = KSampler.SAMPLERS
sampler_list
=
KSampler
.
SAMPLERS
# scheduler_list = KSampler.SCHEDULERS
scheduler_list
=
KSampler
.
SCHEDULERS
# Hard coded sampler and scheduler lists for now
SCHEDULERS
=
[
"normal"
,
"karras"
,
"exponential"
,
"sgm_uniform"
,
"simple"
,
"ddim_uniform"
]
SAMPLERS
=
[
"euler"
,
"euler_ancestral"
,
"heun"
,
"dpm_2"
,
"dpm_2_ancestral"
,
"lms"
,
"dpm_fast"
,
"dpm_adaptive"
,
"dpmpp_2s_ancestral"
,
"dpmpp_sde"
,
"dpmpp_sde_gpu"
,
"dpmpp_2m"
,
"dpmpp_2m_sde"
,
"dpmpp_2m_sde_gpu"
,
"dpmpp_3m_sde"
,
"dpmpp_3m_sde_gpu"
,
"ddim"
,
"uni_pc"
,
"uni_pc_bh2"
]
sampler_list
=
SAMPLERS
scheduler_list
=
SCHEDULERS
@
pytest
.
mark
.
inference
@
pytest
.
mark
.
inference
@
pytest
.
mark
.
parametrize
(
"sampler"
,
sampler_list
)
@
pytest
.
mark
.
parametrize
(
"sampler"
,
sampler_list
)
@
pytest
.
mark
.
parametrize
(
"scheduler"
,
scheduler_list
)
@
pytest
.
mark
.
parametrize
(
"scheduler"
,
scheduler_list
)
...
...
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