diff --git a/fast_saver.py b/fast_saver.py index 2731fb1..ada255b 100644 --- a/fast_saver.py +++ b/fast_saver.py @@ -190,7 +190,7 @@ class FastAbsoluteSaver: RETURN_TYPES = () FUNCTION = "save_images_fast" OUTPUT_NODE = True - CATEGORY = "utils/io" + CATEGORY = "JSON Dynamic/io" def parse_info(self, info_str, batch_size): if not info_str: @@ -433,6 +433,9 @@ class FastAbsoluteSaver: scores_info=None, prompt=None, extra_pnginfo=None): output_path = output_path.strip('"') + if not os.path.isabs(output_path): + import folder_paths + output_path = os.path.join(folder_paths.base_path, output_path) if not os.path.exists(output_path): try: os.makedirs(output_path, exist_ok=True) diff --git a/image_preview.py b/image_preview.py index 67f190e..1ad6863 100644 --- a/image_preview.py +++ b/image_preview.py @@ -93,7 +93,7 @@ class JDL_PreviewToLoad: RETURN_TYPES = () FUNCTION = "preview_and_save" OUTPUT_NODE = True - CATEGORY = "utils/image" + CATEGORY = "JSON Dynamic/image" def preview_and_save(self, images, filename="preview", mask=None, prompt=None, extra_pnginfo=None): # Save to temp/ for preview (same as PreviewImage) @@ -234,7 +234,7 @@ class JDL_LoadImage: RETURN_TYPES = ("IMAGE", "MASK") FUNCTION = "load_image" - CATEGORY = "utils/image" + CATEGORY = "JSON Dynamic/image" def load_image(self, image, active): if not active: @@ -277,7 +277,7 @@ class JDL_ImageReceiver: RETURN_TYPES = ("IMAGE", "MASK", "STRING") RETURN_NAMES = ("image", "mask", "filename") FUNCTION = "receive" - CATEGORY = "utils/image" + CATEGORY = "JSON Dynamic/image" def receive(self, channel, active): if not active: diff --git a/json_loader_dynamic.py b/json_loader_dynamic.py index 8a10b02..bbc0129 100644 --- a/json_loader_dynamic.py +++ b/json_loader_dynamic.py @@ -98,7 +98,7 @@ class JSONDynamicLoader: RETURN_TYPES = tuple(any_type for _ in range(MAX_DYNAMIC_OUTPUTS)) RETURN_NAMES = tuple(f"output_{i}" for i in range(MAX_DYNAMIC_OUTPUTS)) FUNCTION = "load_dynamic" - CATEGORY = "utils/json" + CATEGORY = "JSON Dynamic/json" OUTPUT_NODE = False def load_dynamic(self, json_path, sequence_number, output_keys="", output_types=""): diff --git a/string_utils.py b/string_utils.py index d14c360..66d1e26 100644 --- a/string_utils.py +++ b/string_utils.py @@ -30,7 +30,7 @@ class JDL_PathJoin: RETURN_TYPES = ("STRING",) RETURN_NAMES = ("path",) FUNCTION = "join_path" - CATEGORY = "utils/path" + CATEGORY = "JSON Dynamic/string" def join_path(self, segment_1, segment_2="", segment_3="", segment_4="", segment_5="", segment_6=""): @@ -59,7 +59,7 @@ class JDL_StringFormat: RETURN_TYPES = ("STRING",) RETURN_NAMES = ("string",) FUNCTION = "format_string" - CATEGORY = "utils/string" + CATEGORY = "JSON Dynamic/string" def format_string(self, template, **kwargs): values = [] @@ -92,7 +92,7 @@ class JDL_StringExtract: RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING") RETURN_NAMES = ("result", "dirname", "basename", "extension") FUNCTION = "extract" - CATEGORY = "utils/string" + CATEGORY = "JSON Dynamic/string" def extract(self, text, mode, delimiter="/", index=-1, delimiter_2=""): dirname = os.path.dirname(text) @@ -145,7 +145,7 @@ class JDL_StringSwitch: RETURN_TYPES = (any_type,) RETURN_NAMES = ("result",) FUNCTION = "switch" - CATEGORY = "utils/string" + CATEGORY = "JSON Dynamic/string" def switch(self, condition, on_true=None, on_false=None, default_true="", default_false=""): @@ -173,7 +173,7 @@ class JDL_DependencyPassthrough: RETURN_TYPES = (any_type,) RETURN_NAMES = ("data",) FUNCTION = "passthrough" - CATEGORY = "utils/flow" + CATEGORY = "JSON Dynamic/flow" def passthrough(self, data, wait_for=None): return (data,)