Add node to set only the conditioning area strength.
This commit is contained in:
parent
079dbf9198
commit
9321198da6
21
nodes.py
21
nodes.py
|
@ -184,6 +184,26 @@ class ConditioningSetAreaPercentage:
|
||||||
c.append(n)
|
c.append(n)
|
||||||
return (c, )
|
return (c, )
|
||||||
|
|
||||||
|
class ConditioningSetAreaStrength:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {"required": {"conditioning": ("CONDITIONING", ),
|
||||||
|
"strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}),
|
||||||
|
}}
|
||||||
|
RETURN_TYPES = ("CONDITIONING",)
|
||||||
|
FUNCTION = "append"
|
||||||
|
|
||||||
|
CATEGORY = "conditioning"
|
||||||
|
|
||||||
|
def append(self, conditioning, strength):
|
||||||
|
c = []
|
||||||
|
for t in conditioning:
|
||||||
|
n = [t[0], t[1].copy()]
|
||||||
|
n[1]['strength'] = strength
|
||||||
|
c.append(n)
|
||||||
|
return (c, )
|
||||||
|
|
||||||
|
|
||||||
class ConditioningSetMask:
|
class ConditioningSetMask:
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
|
@ -1754,6 +1774,7 @@ NODE_CLASS_MAPPINGS = {
|
||||||
"ConditioningConcat": ConditioningConcat,
|
"ConditioningConcat": ConditioningConcat,
|
||||||
"ConditioningSetArea": ConditioningSetArea,
|
"ConditioningSetArea": ConditioningSetArea,
|
||||||
"ConditioningSetAreaPercentage": ConditioningSetAreaPercentage,
|
"ConditioningSetAreaPercentage": ConditioningSetAreaPercentage,
|
||||||
|
"ConditioningSetAreaStrength": ConditioningSetAreaStrength,
|
||||||
"ConditioningSetMask": ConditioningSetMask,
|
"ConditioningSetMask": ConditioningSetMask,
|
||||||
"KSamplerAdvanced": KSamplerAdvanced,
|
"KSamplerAdvanced": KSamplerAdvanced,
|
||||||
"SetLatentNoiseMask": SetLatentNoiseMask,
|
"SetLatentNoiseMask": SetLatentNoiseMask,
|
||||||
|
|
Loading…
Reference in New Issue