From 581bf2cd5bf8793ba2f07a8b911728f0407d658d Mon Sep 17 00:00:00 2001 From: Jesse Date: Sat, 1 Jul 2023 20:46:25 +0000 Subject: [PATCH 1/2] Allow minimum setting to 1 so that no file padding is done --- WAS_Node_Suite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WAS_Node_Suite.py b/WAS_Node_Suite.py index 8dbb6ec..f49a196 100644 --- a/WAS_Node_Suite.py +++ b/WAS_Node_Suite.py @@ -6540,7 +6540,7 @@ class WAS_Image_Save: "output_path": ("STRING", {"default": '[time(%Y-%m-%d)]', "multiline": False}), "filename_prefix": ("STRING", {"default": "ComfyUI"}), "filename_delimiter": ("STRING", {"default":"_"}), - "filename_number_padding": ("INT", {"default":4, "min":2, "max":9, "step":1}), + "filename_number_padding": ("INT", {"default":4, "min":1, "max":9, "step":1}), "extension": (['png', 'jpeg', 'gif', 'tiff', 'webp'], ), "quality": ("INT", {"default": 100, "min": 1, "max": 100, "step": 1}), "lossless_webp": (["false", "true"],), From 57007bcc2db2db9654416c99beb99f9c3336f438 Mon Sep 17 00:00:00 2001 From: Jesse Date: Sat, 1 Jul 2023 22:27:45 +0000 Subject: [PATCH 2/2] Added node to count the places of an integer --- WAS_Node_Suite.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/WAS_Node_Suite.py b/WAS_Node_Suite.py index f49a196..90235a9 100644 --- a/WAS_Node_Suite.py +++ b/WAS_Node_Suite.py @@ -12354,6 +12354,28 @@ class WAS_Samples_Passthrough_Stat_System: return [ram_stats, vram_stats, hard_drive_stats] +# Class to count the number of places on an integer + +class WAS_Integer_Place_Counter: + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "int_input": ("INT", {"default": 0, "min": 0, "max": 10000000, "step": 1}), + } + } + RETURN_TYPES = ("INT",) + RETURN_NAMES = ("INT_PLACES",) + FUNCTION = "count_places" + + CATEGORY = "WAS Suite/Integer" + + def count_places(self, int_input): + output = len(str(int_input)) + cstr("\nInteger Places Count: "+str(output)).msg.print() + return (output,) + + # NODE MAPPING NODE_CLASS_MAPPINGS = { "BLIP Model Loader": WAS_BLIP_Model_Loader, @@ -12445,6 +12467,7 @@ NODE_CLASS_MAPPINGS = { "Image to Latent Mask": WAS_Image_To_Mask, "Image to Noise": WAS_Image_To_Noise, "Image to Seed": WAS_Image_To_Seed, + "Integer place counter": WAS_Integer_Place_Counter, "Image Voronoi Noise Filter": WAS_Image_Voronoi_Noise_Filter, "KSampler (WAS)": WAS_KSampler, "KSampler Cycle": WAS_KSampler_Cycle,