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
e82942cc
Commit
e82942cc
authored
Dec 20, 2023
by
comfyanonymous
Browse files
Add a denoise parameter to the SDTurboScheduler.
parent
ba3f3aa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
comfy_extras/nodes_custom_sampler.py
comfy_extras/nodes_custom_sampler.py
+4
-2
No files found.
comfy_extras/nodes_custom_sampler.py
View file @
e82942cc
...
...
@@ -87,6 +87,7 @@ class SDTurboScheduler:
return
{
"required"
:
{
"model"
:
(
"MODEL"
,),
"steps"
:
(
"INT"
,
{
"default"
:
1
,
"min"
:
1
,
"max"
:
10
}),
"denoise"
:
(
"FLOAT"
,
{
"default"
:
1.0
,
"min"
:
0
,
"max"
:
1.0
,
"step"
:
0.01
}),
}
}
RETURN_TYPES
=
(
"SIGMAS"
,)
...
...
@@ -94,8 +95,9 @@ class SDTurboScheduler:
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
model
,
steps
):
timesteps
=
torch
.
flip
(
torch
.
arange
(
1
,
11
)
*
100
-
1
,
(
0
,))[:
steps
]
def
get_sigmas
(
self
,
model
,
steps
,
denoise
):
start_step
=
10
-
int
(
10
*
denoise
)
timesteps
=
torch
.
flip
(
torch
.
arange
(
1
,
11
)
*
100
-
1
,
(
0
,))[
start_step
:
start_step
+
steps
]
sigmas
=
model
.
model
.
model_sampling
.
sigma
(
timesteps
)
sigmas
=
torch
.
cat
([
sigmas
,
sigmas
.
new_zeros
([
1
])])
return
(
sigmas
,
)
...
...
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