Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/impact/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def enhance_detail(image, model, clip, vae, guide_size, guide_size_for_bbox, max
noise_mask = noise_mask.squeeze(3)

if noise_mask_feather > 0:
model = nodes_differential_diffusion.DifferentialDiffusion().apply(model)[0]
model = nodes_differential_diffusion.DifferentialDiffusion().execute(model)[0]

if wildcard_opt is not None and wildcard_opt != "":
model, _, wildcard_positive = wildcards.process_with_loras(wildcard_opt, model, clip)
Expand Down Expand Up @@ -370,7 +370,7 @@ def enhance_detail_for_animatediff(image_frames, model, clip, vae, guide_size, g
noise_mask = noise_mask.squeeze(3)

if noise_mask_feather > 0:
model = nodes_differential_diffusion.DifferentialDiffusion().apply(model)[0]
model = nodes_differential_diffusion.DifferentialDiffusion().execute(model)[0]

if wildcard_opt is not None and wildcard_opt != "":
model, _, wildcard_positive = wildcards.process_with_loras(wildcard_opt, model, clip)
Expand Down
2 changes: 1 addition & 1 deletion modules/impact/segs_upscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def img2img_segs(image, model, clip, vae, seed, steps, cfg, sampler_name, schedu
noise_mask = noise_mask.squeeze(3)

if noise_mask_feather > 0:
model = nodes_differential_diffusion.DifferentialDiffusion().apply(model)[0]
model = nodes_differential_diffusion.DifferentialDiffusion().execute(model)[0]

if control_net_wrapper is not None:
positive, negative, _ = control_net_wrapper.apply(positive, negative, image, noise_mask)
Expand Down
7 changes: 3 additions & 4 deletions modules/impact/util_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def INPUT_TYPES(s):
CATEGORY = "ImpactPack/Operation"

def doit(self, images):
if len(images) <= 1:
if len(images) < 1:
return (images,)
else:
image1 = images[0]
Expand Down Expand Up @@ -549,9 +549,8 @@ def doit(self, string, delimiter, prefix_all, postfix_all, restrict_to_tags, exc
# some sanity checks and normalization for later processing
if prefix_all is None: prefix_all = ""
if postfix_all is None: postfix_all = ""
if restrict_to_tags is None: restrict_to_tags = ""
if exclude_tags is None: exclude_tags = ""
if not isinstance(restrict_to_tags, list):
if restrict_to_tags is not None and restrict_to_tags != "" and not isinstance(restrict_to_tags, list):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restrict_to_tags is always string and not a optional input.
So you can remove

None check of restrict_to_tags and isinstance(restrict_to_tags, list)

        if restrict_to_tags != "":
            restrict_to_tags = restrict_to_tags.split(", ")
        else:
            restrict_to_tags = []

restrict_to_tags = restrict_to_tags.split(", ")
if not isinstance(exclude_tags, list):
exclude_tags = exclude_tags.split(", ")
Expand All @@ -564,7 +563,7 @@ def doit(self, string, delimiter, prefix_all, postfix_all, restrict_to_tags, exc
labels.append(label)
x = x.split(", ")
# restrict to tags
if restrict_to_tags != "":
if isinstance(restrict_to_tags, list):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can assume restrict_to_tags is always a list.

x = list(set(x) & set(restrict_to_tags))
# remove tags
if exclude_tags != "":
Expand Down