diff --git a/CHANGELOG.md b/CHANGELOG.md index ca1042b..ed22b31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ ## v0.0 +## v0.0.8 (2025-01-30) + +- improve reset strategy on queues, to handle early interruptions +- new repo icon URL + ## v0.0.7 (2025-01-29) - improve node `List: Random Seeds` diff --git a/README.md b/README.md index c73963a..96f0a91 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,14 @@ # News +Latest additions: + - 2025-01-29 - v0.0.5: - new List utility nodes: Random Seeds / Checkpoints / LoRAs / Samplers/ Schedulers - reorganize / improve wiki +> Full changelog in the [dedicated file](./CHANGELOG.md). + # Node overview **The complete list of nodes can be found in the [wiki / node list](./wiki/node_list.md)** diff --git a/dist/js/widgets/queue.js b/dist/js/widgets/queue.js index d8419e7..eb25692 100644 --- a/dist/js/widgets/queue.js +++ b/dist/js/widgets/queue.js @@ -19,7 +19,7 @@ export function QUEUE_STATUS(node, inputName, _inputData, app) { throw new Error('QUEUE_STATUS: app is undefined'); const widget = node.addWidget('button', inputName, 0, () => { }); const reset = () => { - widget.value = 0; + widget.value = Math.floor(Math.random() * 10e9) * -1; widget.total = undefined; }; reset(); diff --git a/package.json b/package.json index 486a48a..fb0ca35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "confylab-pack", "private": true, - "version": "0.0.7", + "version": "0.0.8", "type": "module", "scripts": { "watch": "tsc-watch -p tsconfig.json --onSuccess 'tsc-alias -p tsconfig.json -r build/replacers.js/mock.js'", diff --git a/pyproject.toml b/pyproject.toml index f960b9d..ea43dbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfylab-pack" description = "Nodes: fully-customizable and versatile XY Plot grid, dynamic outputs from config files, Format String, various List utilities, ... visit the wiki for a complete list, tutorials and more." -version = "0.0.7" +version = "0.0.8" authors = [{ name = "bugltd" }] license = {file = "LICENSE"} readme = "README.md" @@ -18,4 +18,4 @@ Changelog = "https://github.com/bugltd/ComfyLab-Pack/blob/main/CHANGELOG.md" [tool.comfy] PublisherId = "bugltd" DisplayName = "ComfyLab Pack" -Icon = "https://github.com/bugltd/ComfyLab-Pack/blob/main/static/repo_icon_400.png" +Icon = "https://i.postimg.cc/Cx5ZRzk5/Comfy-Lab-Icon-400.png" diff --git a/src/python/nodes/list.py b/src/python/nodes/list.py index 5ba4d1b..6f805a2 100644 --- a/src/python/nodes/list.py +++ b/src/python/nodes/list.py @@ -364,7 +364,7 @@ class ListRandomSeeds: 'list of random seeds', TOOLTIP_OUTPUT_COUNT, ) - DESCRIPTION = 'Create a list of random seeds.' + DESCRIPTION = 'Create a list of random seeds.\nThe list is regenerated when clicking the button, restarting the backend, or refreshing the browser page.' def run(self, count): values = [] diff --git a/src/python/nodes/plot.py b/src/python/nodes/plot.py index bca6559..124fd19 100644 --- a/src/python/nodes/plot.py +++ b/src/python/nodes/plot.py @@ -90,6 +90,13 @@ class XYPlotQueue: index: int, dim2: list[str] = [''], ): + print('------------------------------------') + print('index = ', index) + print('------------------------------------') + + if index < 0: # value has been reset (completion, interrupt, errors) + index = 0 + if len(dim2) == 0: dim2 = [''] diff --git a/src/python/nodes/queue.py b/src/python/nodes/queue.py index aba1e85..50a6f59 100644 --- a/src/python/nodes/queue.py +++ b/src/python/nodes/queue.py @@ -34,6 +34,9 @@ class GenericQueue: DESCRIPTION = 'Loop through all values of input list, and send them to output.' def run(self, input_list: list[Any], index: int): + if index < 0: # value has been reset (completion, interrupt, errors) + index = 0 + total = len(input_list) if total == 0: raise Exception('Empty input list') @@ -137,6 +140,9 @@ class FileQueue: with_extension: bool, index: int, ): + if index < 0: # value has been reset (completion, interrupt, errors) + index = 0 + # only scan files at the beginning if index == 0: self.scan_folder(folder, pattern, recursive) diff --git a/src/ts/widgets/queue.ts b/src/ts/widgets/queue.ts index 835d5f8..b323755 100644 --- a/src/ts/widgets/queue.ts +++ b/src/ts/widgets/queue.ts @@ -40,7 +40,8 @@ export function QUEUE_STATUS( const widget = node.addWidget('button', inputName, 0, () => {}) const reset = () => { - widget.value = 0 + // set widget value to a random negative value, to ensure we can restart in any case + widget.value = Math.floor(Math.random() * 10e9) * -1 widget.total = undefined }