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
cfbf3be5
Commit
cfbf3be5
authored
Apr 04, 2024
by
comfyanonymous
Browse files
Add basic guider for models with no cfg.
parent
c6bd456c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
comfy_extras/nodes_custom_sampler.py
comfy_extras/nodes_custom_sampler.py
+23
-0
No files found.
comfy_extras/nodes_custom_sampler.py
View file @
cfbf3be5
...
...
@@ -383,6 +383,28 @@ class SamplerCustom:
out_denoised
=
out
return
(
out
,
out_denoised
)
class
Guider_Basic
(
comfy
.
samplers
.
CFGGuider
):
def
set_conds
(
self
,
positive
):
self
.
inner_set_conds
({
"positive"
:
positive
})
class
BasicGuider
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"model"
:
(
"MODEL"
,),
"conditioning"
:
(
"CONDITIONING"
,
),
}
}
RETURN_TYPES
=
(
"GUIDER"
,)
FUNCTION
=
"get_guider"
CATEGORY
=
"sampling/custom_sampling/guiders"
def
get_guider
(
self
,
model
,
conditioning
):
guider
=
Guider_Basic
(
model
)
guider
.
set_conds
(
conditioning
)
return
(
guider
,)
class
CFGGuider
:
@
classmethod
...
...
@@ -496,6 +518,7 @@ NODE_CLASS_MAPPINGS = {
"FlipSigmas"
:
FlipSigmas
,
"CFGGuider"
:
CFGGuider
,
"BasicGuider"
:
BasicGuider
,
"RandomNoise"
:
RandomNoise
,
"DisableNoise"
:
DisableNoise
,
"SamplerCustomAdvanced"
:
SamplerCustomAdvanced
,
...
...
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