|
|
@ -80,6 +80,7 @@ class ConditioningSetArea: |
|
|
|
n = [t[0], t[1].copy()] |
|
|
|
n = [t[0], t[1].copy()] |
|
|
|
n[1]['area'] = (height // 8, width // 8, y // 8, x // 8) |
|
|
|
n[1]['area'] = (height // 8, width // 8, y // 8, x // 8) |
|
|
|
n[1]['strength'] = strength |
|
|
|
n[1]['strength'] = strength |
|
|
|
|
|
|
|
n[1]['set_area_to_bounds'] = False |
|
|
|
n[1]['min_sigma'] = min_sigma |
|
|
|
n[1]['min_sigma'] = min_sigma |
|
|
|
n[1]['max_sigma'] = max_sigma |
|
|
|
n[1]['max_sigma'] = max_sigma |
|
|
|
c.append(n) |
|
|
|
c.append(n) |
|
|
@ -90,16 +91,19 @@ class ConditioningSetMask: |
|
|
|
def INPUT_TYPES(s): |
|
|
|
def INPUT_TYPES(s): |
|
|
|
return {"required": {"conditioning": ("CONDITIONING", ), |
|
|
|
return {"required": {"conditioning": ("CONDITIONING", ), |
|
|
|
"mask": ("MASK", ), |
|
|
|
"mask": ("MASK", ), |
|
|
|
"set_area_to_bounds": ([False, True],), |
|
|
|
|
|
|
|
"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}), |
|
|
|
|
|
|
|
"set_cond_area": (["default", "mask bounds"],), |
|
|
|
}} |
|
|
|
}} |
|
|
|
RETURN_TYPES = ("CONDITIONING",) |
|
|
|
RETURN_TYPES = ("CONDITIONING",) |
|
|
|
FUNCTION = "append" |
|
|
|
FUNCTION = "append" |
|
|
|
|
|
|
|
|
|
|
|
CATEGORY = "conditioning" |
|
|
|
CATEGORY = "conditioning" |
|
|
|
|
|
|
|
|
|
|
|
def append(self, conditioning, mask, set_area_to_bounds, strength): |
|
|
|
def append(self, conditioning, mask, set_cond_area, strength): |
|
|
|
c = [] |
|
|
|
c = [] |
|
|
|
|
|
|
|
set_area_to_bounds = False |
|
|
|
|
|
|
|
if set_cond_area != "default": |
|
|
|
|
|
|
|
set_area_to_bounds = True |
|
|
|
if len(mask.shape) < 3: |
|
|
|
if len(mask.shape) < 3: |
|
|
|
mask = mask.unsqueeze(0) |
|
|
|
mask = mask.unsqueeze(0) |
|
|
|
for t in conditioning: |
|
|
|
for t in conditioning: |
|
|
|