|
|
@ -208,8 +208,8 @@ class ConditioningSetTimestepRange: |
|
|
|
@classmethod |
|
|
|
@classmethod |
|
|
|
def INPUT_TYPES(s): |
|
|
|
def INPUT_TYPES(s): |
|
|
|
return {"required": {"conditioning": ("CONDITIONING", ), |
|
|
|
return {"required": {"conditioning": ("CONDITIONING", ), |
|
|
|
"start": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001}), |
|
|
|
"start": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}), |
|
|
|
"end": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}) |
|
|
|
"end": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001}) |
|
|
|
}} |
|
|
|
}} |
|
|
|
RETURN_TYPES = ("CONDITIONING",) |
|
|
|
RETURN_TYPES = ("CONDITIONING",) |
|
|
|
FUNCTION = "set_range" |
|
|
|
FUNCTION = "set_range" |
|
|
@ -220,8 +220,8 @@ class ConditioningSetTimestepRange: |
|
|
|
c = [] |
|
|
|
c = [] |
|
|
|
for t in conditioning: |
|
|
|
for t in conditioning: |
|
|
|
d = t[1].copy() |
|
|
|
d = t[1].copy() |
|
|
|
d['start_percent'] = start |
|
|
|
d['start_percent'] = 1.0 - start |
|
|
|
d['end_percent'] = end |
|
|
|
d['end_percent'] = 1.0 - end |
|
|
|
n = [t[0], d] |
|
|
|
n = [t[0], d] |
|
|
|
c.append(n) |
|
|
|
c.append(n) |
|
|
|
return (c, ) |
|
|
|
return (c, ) |
|
|
@ -615,8 +615,8 @@ class ControlNetApplyAdvanced: |
|
|
|
"control_net": ("CONTROL_NET", ), |
|
|
|
"control_net": ("CONTROL_NET", ), |
|
|
|
"image": ("IMAGE", ), |
|
|
|
"image": ("IMAGE", ), |
|
|
|
"strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), |
|
|
|
"strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), |
|
|
|
"start": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001}), |
|
|
|
"start_percent": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}), |
|
|
|
"end": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}) |
|
|
|
"end_percent": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001}) |
|
|
|
}} |
|
|
|
}} |
|
|
|
|
|
|
|
|
|
|
|
RETURN_TYPES = ("CONDITIONING","CONDITIONING") |
|
|
|
RETURN_TYPES = ("CONDITIONING","CONDITIONING") |
|
|
@ -625,7 +625,7 @@ class ControlNetApplyAdvanced: |
|
|
|
|
|
|
|
|
|
|
|
CATEGORY = "conditioning" |
|
|
|
CATEGORY = "conditioning" |
|
|
|
|
|
|
|
|
|
|
|
def apply_controlnet(self, positive, negative, control_net, image, strength, start, end): |
|
|
|
def apply_controlnet(self, positive, negative, control_net, image, strength, start_percent, end_percent): |
|
|
|
if strength == 0: |
|
|
|
if strength == 0: |
|
|
|
return (positive, negative) |
|
|
|
return (positive, negative) |
|
|
|
|
|
|
|
|
|
|
@ -642,7 +642,7 @@ class ControlNetApplyAdvanced: |
|
|
|
if prev_cnet in cnets: |
|
|
|
if prev_cnet in cnets: |
|
|
|
c_net = cnets[prev_cnet] |
|
|
|
c_net = cnets[prev_cnet] |
|
|
|
else: |
|
|
|
else: |
|
|
|
c_net = control_net.copy().set_cond_hint(control_hint, strength, (start, end)) |
|
|
|
c_net = control_net.copy().set_cond_hint(control_hint, strength, (1.0 - start_percent, 1.0 - end_percent)) |
|
|
|
c_net.set_previous_controlnet(prev_cnet) |
|
|
|
c_net.set_previous_controlnet(prev_cnet) |
|
|
|
cnets[prev_cnet] = c_net |
|
|
|
cnets[prev_cnet] = c_net |
|
|
|
|
|
|
|
|
|
|
|