Group all nodes under JSON Dynamic menu category
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -190,7 +190,7 @@ class FastAbsoluteSaver:
|
|||||||
RETURN_TYPES = ()
|
RETURN_TYPES = ()
|
||||||
FUNCTION = "save_images_fast"
|
FUNCTION = "save_images_fast"
|
||||||
OUTPUT_NODE = True
|
OUTPUT_NODE = True
|
||||||
CATEGORY = "utils/io"
|
CATEGORY = "JSON Dynamic/io"
|
||||||
|
|
||||||
def parse_info(self, info_str, batch_size):
|
def parse_info(self, info_str, batch_size):
|
||||||
if not info_str:
|
if not info_str:
|
||||||
@@ -433,6 +433,9 @@ class FastAbsoluteSaver:
|
|||||||
scores_info=None, prompt=None, extra_pnginfo=None):
|
scores_info=None, prompt=None, extra_pnginfo=None):
|
||||||
|
|
||||||
output_path = output_path.strip('"')
|
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):
|
if not os.path.exists(output_path):
|
||||||
try:
|
try:
|
||||||
os.makedirs(output_path, exist_ok=True)
|
os.makedirs(output_path, exist_ok=True)
|
||||||
|
|||||||
+3
-3
@@ -93,7 +93,7 @@ class JDL_PreviewToLoad:
|
|||||||
RETURN_TYPES = ()
|
RETURN_TYPES = ()
|
||||||
FUNCTION = "preview_and_save"
|
FUNCTION = "preview_and_save"
|
||||||
OUTPUT_NODE = True
|
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):
|
def preview_and_save(self, images, filename="preview", mask=None, prompt=None, extra_pnginfo=None):
|
||||||
# Save to temp/ for preview (same as PreviewImage)
|
# Save to temp/ for preview (same as PreviewImage)
|
||||||
@@ -234,7 +234,7 @@ class JDL_LoadImage:
|
|||||||
|
|
||||||
RETURN_TYPES = ("IMAGE", "MASK")
|
RETURN_TYPES = ("IMAGE", "MASK")
|
||||||
FUNCTION = "load_image"
|
FUNCTION = "load_image"
|
||||||
CATEGORY = "utils/image"
|
CATEGORY = "JSON Dynamic/image"
|
||||||
|
|
||||||
def load_image(self, image, active):
|
def load_image(self, image, active):
|
||||||
if not active:
|
if not active:
|
||||||
@@ -277,7 +277,7 @@ class JDL_ImageReceiver:
|
|||||||
RETURN_TYPES = ("IMAGE", "MASK", "STRING")
|
RETURN_TYPES = ("IMAGE", "MASK", "STRING")
|
||||||
RETURN_NAMES = ("image", "mask", "filename")
|
RETURN_NAMES = ("image", "mask", "filename")
|
||||||
FUNCTION = "receive"
|
FUNCTION = "receive"
|
||||||
CATEGORY = "utils/image"
|
CATEGORY = "JSON Dynamic/image"
|
||||||
|
|
||||||
def receive(self, channel, active):
|
def receive(self, channel, active):
|
||||||
if not active:
|
if not active:
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class JSONDynamicLoader:
|
|||||||
RETURN_TYPES = tuple(any_type for _ in range(MAX_DYNAMIC_OUTPUTS))
|
RETURN_TYPES = tuple(any_type for _ in range(MAX_DYNAMIC_OUTPUTS))
|
||||||
RETURN_NAMES = tuple(f"output_{i}" for i in range(MAX_DYNAMIC_OUTPUTS))
|
RETURN_NAMES = tuple(f"output_{i}" for i in range(MAX_DYNAMIC_OUTPUTS))
|
||||||
FUNCTION = "load_dynamic"
|
FUNCTION = "load_dynamic"
|
||||||
CATEGORY = "utils/json"
|
CATEGORY = "JSON Dynamic/json"
|
||||||
OUTPUT_NODE = False
|
OUTPUT_NODE = False
|
||||||
|
|
||||||
def load_dynamic(self, json_path, sequence_number, output_keys="", output_types=""):
|
def load_dynamic(self, json_path, sequence_number, output_keys="", output_types=""):
|
||||||
|
|||||||
+5
-5
@@ -30,7 +30,7 @@ class JDL_PathJoin:
|
|||||||
RETURN_TYPES = ("STRING",)
|
RETURN_TYPES = ("STRING",)
|
||||||
RETURN_NAMES = ("path",)
|
RETURN_NAMES = ("path",)
|
||||||
FUNCTION = "join_path"
|
FUNCTION = "join_path"
|
||||||
CATEGORY = "utils/path"
|
CATEGORY = "JSON Dynamic/string"
|
||||||
|
|
||||||
def join_path(self, segment_1, segment_2="", segment_3="", segment_4="",
|
def join_path(self, segment_1, segment_2="", segment_3="", segment_4="",
|
||||||
segment_5="", segment_6=""):
|
segment_5="", segment_6=""):
|
||||||
@@ -59,7 +59,7 @@ class JDL_StringFormat:
|
|||||||
RETURN_TYPES = ("STRING",)
|
RETURN_TYPES = ("STRING",)
|
||||||
RETURN_NAMES = ("string",)
|
RETURN_NAMES = ("string",)
|
||||||
FUNCTION = "format_string"
|
FUNCTION = "format_string"
|
||||||
CATEGORY = "utils/string"
|
CATEGORY = "JSON Dynamic/string"
|
||||||
|
|
||||||
def format_string(self, template, **kwargs):
|
def format_string(self, template, **kwargs):
|
||||||
values = []
|
values = []
|
||||||
@@ -92,7 +92,7 @@ class JDL_StringExtract:
|
|||||||
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING")
|
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING")
|
||||||
RETURN_NAMES = ("result", "dirname", "basename", "extension")
|
RETURN_NAMES = ("result", "dirname", "basename", "extension")
|
||||||
FUNCTION = "extract"
|
FUNCTION = "extract"
|
||||||
CATEGORY = "utils/string"
|
CATEGORY = "JSON Dynamic/string"
|
||||||
|
|
||||||
def extract(self, text, mode, delimiter="/", index=-1, delimiter_2=""):
|
def extract(self, text, mode, delimiter="/", index=-1, delimiter_2=""):
|
||||||
dirname = os.path.dirname(text)
|
dirname = os.path.dirname(text)
|
||||||
@@ -145,7 +145,7 @@ class JDL_StringSwitch:
|
|||||||
RETURN_TYPES = (any_type,)
|
RETURN_TYPES = (any_type,)
|
||||||
RETURN_NAMES = ("result",)
|
RETURN_NAMES = ("result",)
|
||||||
FUNCTION = "switch"
|
FUNCTION = "switch"
|
||||||
CATEGORY = "utils/string"
|
CATEGORY = "JSON Dynamic/string"
|
||||||
|
|
||||||
def switch(self, condition, on_true=None, on_false=None,
|
def switch(self, condition, on_true=None, on_false=None,
|
||||||
default_true="", default_false=""):
|
default_true="", default_false=""):
|
||||||
@@ -173,7 +173,7 @@ class JDL_DependencyPassthrough:
|
|||||||
RETURN_TYPES = (any_type,)
|
RETURN_TYPES = (any_type,)
|
||||||
RETURN_NAMES = ("data",)
|
RETURN_NAMES = ("data",)
|
||||||
FUNCTION = "passthrough"
|
FUNCTION = "passthrough"
|
||||||
CATEGORY = "utils/flow"
|
CATEGORY = "JSON Dynamic/flow"
|
||||||
|
|
||||||
def passthrough(self, data, wait_for=None):
|
def passthrough(self, data, wait_for=None):
|
||||||
return (data,)
|
return (data,)
|
||||||
|
|||||||
Reference in New Issue
Block a user