diff --git a/README.md b/README.md index 36e7f25..c312960 100644 --- a/README.md +++ b/README.md @@ -428,3 +428,5 @@ The tile sampler allows high-resolution sampling even in places with low GPU VRA BlenderNeok/[ComfyUI_Noise](https://github.com/BlenderNeko/ComfyUI_Noise) - The noise injection feature relies on this function. WASasquatch/[was-node-suite-comfyui](https://github.com/WASasquatch/was-node-suite-comfyui) - A powerful custom node extensions of ComfyUI. + +Trung0246/[ComfyUI-0246](https://github.com/Trung0246/ComfyUI-0246) - Nice bypass hack! diff --git a/modules/impact/config.py b/modules/impact/config.py index 0bf71ed..4d5e47a 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -2,7 +2,7 @@ import configparser import os -version = "V4.48.7" +version = "V4.48.8" dependency_version = 19 diff --git a/modules/impact/util_nodes.py b/modules/impact/util_nodes.py index 4f3a372..873b34f 100644 --- a/modules/impact/util_nodes.py +++ b/modules/impact/util_nodes.py @@ -1,4 +1,4 @@ -from impact.utils import any_typ +from impact.utils import any_typ, ByPassTypeTuple import comfy_extras.nodes_mask from nodes import MAX_RESOLUTION @@ -55,7 +55,7 @@ class GeneralInversedSwitch: "hidden": {"unique_id": "UNIQUE_ID"}, } - RETURN_TYPES = tuple([any_typ] * 100) + RETURN_TYPES = ByPassTypeTuple((any_typ, )) FUNCTION = "doit" CATEGORY = "ImpactPack/Util" diff --git a/modules/impact/utils.py b/modules/impact/utils.py index f832aa3..943efbc 100644 --- a/modules/impact/utils.py +++ b/modules/impact/utils.py @@ -468,6 +468,22 @@ def apply_mask_alpha_to_pil(decoded_pil, mask): return decoded_rgba +# author: Trung0246 ---> +class TautologyStr(str): + def __ne__(self, other): + return False + + +class ByPassTypeTuple(tuple): + def __getitem__(self, index): + if index > 0: + index = 0 + item = super().__getitem__(index) + if isinstance(item, str): + return TautologyStr(item) + return item + + class NonListIterable: def __init__(self, data): self.data = data @@ -476,7 +492,6 @@ class NonListIterable: return self.data[index] -# author: Trung0246 def add_folder_path_and_extensions(folder_name, full_folder_paths, extensions): # Iterate over the list of full folder paths for full_folder_path in full_folder_paths: @@ -496,7 +511,7 @@ def add_folder_path_and_extensions(folder_name, full_folder_paths, extensions): # Now we just need to update the set of extensions as it would be an empty set # Also ensure that all paths are included (since add_model_folder_path adds only one path at a time) folder_paths.folder_names_and_paths[folder_name] = (full_folder_paths, extensions) - +# <--- # wildcard trick is taken from pythongossss's class AnyType(str):