diff --git a/line_counter.py b/line_counter.py index d159260..c36844c 100644 --- a/line_counter.py +++ b/line_counter.py @@ -84,7 +84,9 @@ class SimpleNumberCounter: "step": ("FLOAT", {"default": 1, "min": 0, "max": 99999, "step": 0.01}), }, "optional": { - "reset_bool": ("NUMBER",), + "reset_bool": ("BOOLEAN", {"default": False, + "label_on": "Reset", + "label_off": "Off"}), }, "hidden": { "unique_id": "UNIQUE_ID", @@ -101,13 +103,13 @@ class SimpleNumberCounter: CATEGORY = "🤖 CCTech/Utilities" - def increment_number(self, number_type, mode, start, stop, step, unique_id, reset_bool=0): + def increment_number(self, number_type, mode, start, stop, step, unique_id, reset_bool=False): counter = int(start) if number_type == 'integer' else start if unique_id in self.counters: counter = self.counters[unique_id] - if round(reset_bool) >= 1: + if reset_bool: counter = start elif mode == 'increment': counter += step diff --git a/pyproject.toml b/pyproject.toml index d2671c8..9a5cf44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-line-counter" description = "This custom node package for ComfyUI is designed to streamline your workflow with powerful file-counting capabilities." -version = "1.0.9" +version = "1.0.10" license = {file = "LICENSE"} [project.urls]