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
"...composable_kernel_onnx.git" did not exist on "796f72e26ef9ad6955caa125e3f26eb10c69b2fa"
Commit
cfbf3be5
authored
Apr 04, 2024
by
comfyanonymous
Browse files
Add basic guider for models with no cfg.
parent
c6bd456c
Changes
1
Hide 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:
...
@@ -383,6 +383,28 @@ class SamplerCustom:
out_denoised
=
out
out_denoised
=
out
return
(
out
,
out_denoised
)
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
:
class
CFGGuider
:
@
classmethod
@
classmethod
...
@@ -496,6 +518,7 @@ NODE_CLASS_MAPPINGS = {
...
@@ -496,6 +518,7 @@ NODE_CLASS_MAPPINGS = {
"FlipSigmas"
:
FlipSigmas
,
"FlipSigmas"
:
FlipSigmas
,
"CFGGuider"
:
CFGGuider
,
"CFGGuider"
:
CFGGuider
,
"BasicGuider"
:
BasicGuider
,
"RandomNoise"
:
RandomNoise
,
"RandomNoise"
:
RandomNoise
,
"DisableNoise"
:
DisableNoise
,
"DisableNoise"
:
DisableNoise
,
"SamplerCustomAdvanced"
:
SamplerCustomAdvanced
,
"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