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
d1f3637a
Commit
d1f3637a
authored
Dec 31, 2023
by
comfyanonymous
Browse files
Add a denoise parameter to BasicScheduler node.
parent
36e15f25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
comfy_extras/nodes_custom_sampler.py
comfy_extras/nodes_custom_sampler.py
+8
-2
No files found.
comfy_extras/nodes_custom_sampler.py
View file @
d1f3637a
...
@@ -13,6 +13,7 @@ class BasicScheduler:
...
@@ -13,6 +13,7 @@ class BasicScheduler:
{
"model"
:
(
"MODEL"
,),
{
"model"
:
(
"MODEL"
,),
"scheduler"
:
(
comfy
.
samplers
.
SCHEDULER_NAMES
,
),
"scheduler"
:
(
comfy
.
samplers
.
SCHEDULER_NAMES
,
),
"steps"
:
(
"INT"
,
{
"default"
:
20
,
"min"
:
1
,
"max"
:
10000
}),
"steps"
:
(
"INT"
,
{
"default"
:
20
,
"min"
:
1
,
"max"
:
10000
}),
"denoise"
:
(
"FLOAT"
,
{
"default"
:
1.0
,
"min"
:
0.0
,
"max"
:
1.0
,
"step"
:
0.01
}),
}
}
}
}
RETURN_TYPES
=
(
"SIGMAS"
,)
RETURN_TYPES
=
(
"SIGMAS"
,)
...
@@ -20,8 +21,13 @@ class BasicScheduler:
...
@@ -20,8 +21,13 @@ class BasicScheduler:
FUNCTION
=
"get_sigmas"
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
model
,
scheduler
,
steps
):
def
get_sigmas
(
self
,
model
,
scheduler
,
steps
,
denoise
):
sigmas
=
comfy
.
samplers
.
calculate_sigmas_scheduler
(
model
.
model
,
scheduler
,
steps
).
cpu
()
total_steps
=
steps
if
denoise
<
1.0
:
total_steps
=
int
(
steps
/
denoise
)
sigmas
=
comfy
.
samplers
.
calculate_sigmas_scheduler
(
model
.
model
,
scheduler
,
total_steps
).
cpu
()
sigmas
=
sigmas
[
-
(
steps
+
1
):]
return
(
sigmas
,
)
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