Skip to content

Commit 8e01204

Browse files
Add a ModelSamplingAuraFlow node to change the shift value.
Set the default AuraFlow shift value to 1.73 (sqrt(3)).
1 parent 9f291d7 commit 8e01204

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

comfy/supported_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ class AuraFlow(supported_models_base.BASE):
564564

565565
sampling_settings = {
566566
"multiplier": 1.0,
567+
"shift": 1.73,
567568
}
568569

569570
unet_extra_config = {}

comfy_extras/nodes_model_advanced.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def INPUT_TYPES(s):
144144

145145
CATEGORY = "advanced/model"
146146

147-
def patch(self, model, shift):
147+
def patch(self, model, shift, multiplier=1000):
148148
m = model.clone()
149149

150150
sampling_base = comfy.model_sampling.ModelSamplingDiscreteFlow
@@ -154,10 +154,22 @@ class ModelSamplingAdvanced(sampling_base, sampling_type):
154154
pass
155155

156156
model_sampling = ModelSamplingAdvanced(model.model.model_config)
157-
model_sampling.set_parameters(shift=shift)
157+
model_sampling.set_parameters(shift=shift, multiplier=multiplier)
158158
m.add_object_patch("model_sampling", model_sampling)
159159
return (m, )
160160

161+
class ModelSamplingAuraFlow(ModelSamplingSD3):
162+
@classmethod
163+
def INPUT_TYPES(s):
164+
return {"required": { "model": ("MODEL",),
165+
"shift": ("FLOAT", {"default": 1.73, "min": 0.0, "max": 100.0, "step":0.01}),
166+
}}
167+
168+
FUNCTION = "patch_aura"
169+
170+
def patch_aura(self, model, shift):
171+
return self.patch(model, shift, multiplier=1.0)
172+
161173
class ModelSamplingContinuousEDM:
162174
@classmethod
163175
def INPUT_TYPES(s):
@@ -271,5 +283,6 @@ def rescale_cfg(args):
271283
"ModelSamplingContinuousV": ModelSamplingContinuousV,
272284
"ModelSamplingStableCascade": ModelSamplingStableCascade,
273285
"ModelSamplingSD3": ModelSamplingSD3,
286+
"ModelSamplingAuraFlow": ModelSamplingAuraFlow,
274287
"RescaleCFG": RescaleCFG,
275288
}

0 commit comments

Comments
 (0)