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
10fcd09f
"...git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "c94428a880bce206ea91f165019ccf14de225eeb"
Commit
10fcd09f
authored
Apr 27, 2024
by
comfyanonymous
Browse files
Add a denoise value to AlignYourStepsScheduler.
parent
8cab3be6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
comfy_extras/nodes_align_your_steps.py
comfy_extras/nodes_align_your_steps.py
+9
-1
No files found.
comfy_extras/nodes_align_your_steps.py
View file @
10fcd09f
...
@@ -25,6 +25,7 @@ class AlignYourStepsScheduler:
...
@@ -25,6 +25,7 @@ class AlignYourStepsScheduler:
return
{
"required"
:
return
{
"required"
:
{
"model_type"
:
([
"SD1"
,
"SDXL"
,
"SVD"
],
),
{
"model_type"
:
([
"SD1"
,
"SDXL"
,
"SVD"
],
),
"steps"
:
(
"INT"
,
{
"default"
:
10
,
"min"
:
10
,
"max"
:
10000
}),
"steps"
:
(
"INT"
,
{
"default"
:
10
,
"min"
:
10
,
"max"
:
10000
}),
"denoise"
:
(
"FLOAT"
,
{
"default"
:
1.0
,
"min"
:
0.0
,
"max"
:
1.0
,
"step"
:
0.01
}),
}
}
}
}
RETURN_TYPES
=
(
"SIGMAS"
,)
RETURN_TYPES
=
(
"SIGMAS"
,)
...
@@ -32,11 +33,18 @@ class AlignYourStepsScheduler:
...
@@ -32,11 +33,18 @@ class AlignYourStepsScheduler:
FUNCTION
=
"get_sigmas"
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
model_type
,
steps
):
def
get_sigmas
(
self
,
model_type
,
steps
,
denoise
):
total_steps
=
steps
if
denoise
<
1.0
:
if
denoise
<=
0.0
:
return
(
torch
.
FloatTensor
([]),)
total_steps
=
round
(
steps
*
denoise
)
sigmas
=
NOISE_LEVELS
[
model_type
][:]
sigmas
=
NOISE_LEVELS
[
model_type
][:]
if
(
steps
+
1
)
!=
len
(
sigmas
):
if
(
steps
+
1
)
!=
len
(
sigmas
):
sigmas
=
loglinear_interp
(
sigmas
,
steps
+
1
)
sigmas
=
loglinear_interp
(
sigmas
,
steps
+
1
)
sigmas
=
sigmas
[
-
(
total_steps
+
1
):]
sigmas
[
-
1
]
=
0
sigmas
[
-
1
]
=
0
return
(
torch
.
FloatTensor
(
sigmas
),
)
return
(
torch
.
FloatTensor
(
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