improve queue interruption handling (#15)
* improve queues to better handle early interruptions * new repo icon URL * bump to version v0.0.8
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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)**
|
||||
|
||||
Vendored
+1
-1
@@ -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();
|
||||
|
||||
+1
-1
@@ -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'",
|
||||
|
||||
+2
-2
@@ -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"
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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 = ['']
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user