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
8e012043
Commit
8e012043
authored
Jul 11, 2024
by
comfyanonymous
Browse files
Add a ModelSamplingAuraFlow node to change the shift value.
Set the default AuraFlow shift value to 1.73 (sqrt(3)).
parent
9f291d75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
comfy/supported_models.py
comfy/supported_models.py
+1
-0
comfy_extras/nodes_model_advanced.py
comfy_extras/nodes_model_advanced.py
+15
-2
No files found.
comfy/supported_models.py
View file @
8e012043
...
...
@@ -564,6 +564,7 @@ class AuraFlow(supported_models_base.BASE):
sampling_settings
=
{
"multiplier"
:
1.0
,
"shift"
:
1.73
,
}
unet_extra_config
=
{}
...
...
comfy_extras/nodes_model_advanced.py
View file @
8e012043
...
...
@@ -144,7 +144,7 @@ class ModelSamplingSD3:
CATEGORY
=
"advanced/model"
def
patch
(
self
,
model
,
shift
):
def
patch
(
self
,
model
,
shift
,
multiplier
=
1000
):
m
=
model
.
clone
()
sampling_base
=
comfy
.
model_sampling
.
ModelSamplingDiscreteFlow
...
...
@@ -154,10 +154,22 @@ class ModelSamplingSD3:
pass
model_sampling
=
ModelSamplingAdvanced
(
model
.
model
.
model_config
)
model_sampling
.
set_parameters
(
shift
=
shift
)
model_sampling
.
set_parameters
(
shift
=
shift
,
multiplier
=
multiplier
)
m
.
add_object_patch
(
"model_sampling"
,
model_sampling
)
return
(
m
,
)
class
ModelSamplingAuraFlow
(
ModelSamplingSD3
):
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"model"
:
(
"MODEL"
,),
"shift"
:
(
"FLOAT"
,
{
"default"
:
1.73
,
"min"
:
0.0
,
"max"
:
100.0
,
"step"
:
0.01
}),
}}
FUNCTION
=
"patch_aura"
def
patch_aura
(
self
,
model
,
shift
):
return
self
.
patch
(
model
,
shift
,
multiplier
=
1.0
)
class
ModelSamplingContinuousEDM
:
@
classmethod
def
INPUT_TYPES
(
s
):
...
...
@@ -271,5 +283,6 @@ NODE_CLASS_MAPPINGS = {
"ModelSamplingContinuousV"
:
ModelSamplingContinuousV
,
"ModelSamplingStableCascade"
:
ModelSamplingStableCascade
,
"ModelSamplingSD3"
:
ModelSamplingSD3
,
"ModelSamplingAuraFlow"
:
ModelSamplingAuraFlow
,
"RescaleCFG"
:
RescaleCFG
,
}
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