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