Restructure for future growth and packaging clarity: * hold_counter_node.py -> hold_counter/node.py (git rename, history preserved). Top-level __init__.py is now a thin ComfyUI entry point that re-exports NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS, and WEB_DIRECTORY from the new subpackage. * New hold_counter/__init__.py exposes HoldCounter, NodeState, MODES, DEFAULT_MODE, and the ComfyUI mappings as the package public API. * pyproject hatch wheel target simplified to packages = ["hold_counter"] (the source-mapping and force-include hacks are no longer needed); pyright include list updated to the new layout. * tests now import hold_counter.node instead of hold_counter_node. Fixes: * pyright reportUnknownVariableType on NodeState.perm — typed the dataclass default_factory as list[int]. * CHANGELOG MD024 (duplicate "### Added" / "### Fixed" headings under per-version sections) — disabled per-file via markdownlint comment; this is the conventional fix for Keep-a-Changelog files. Also folds in light user-applied formatting tweaks to web/hold_counter.js (comment wrapping) and workflows/hold_counter_basic.json (4-space indent / expanded form). No public behaviour change. The only "breaking" aspect is the import path for downstream Python consumers (hold_counter_node -> hold_counter.node); ComfyUI itself is unaffected since it loads custom_nodes/hold_counter/__init__.py.
149 lines
3.4 KiB
JSON
149 lines
3.4 KiB
JSON
{
|
|
"config": {},
|
|
"extra": {
|
|
"info": {
|
|
"description": "HoldCounter feeding both an INT (e.g. a Load Image batch index) and a zero-padded STRING (e.g. a filename prefix). Configure runs_per_index to control how many runs each index is held for.",
|
|
"name": "Hold Counter — basic"
|
|
}
|
|
},
|
|
"groups": [],
|
|
"last_link_id": 2,
|
|
"last_node_id": 3,
|
|
"links": [
|
|
[
|
|
1,
|
|
1,
|
|
0,
|
|
2,
|
|
0,
|
|
"INT"
|
|
],
|
|
[
|
|
2,
|
|
1,
|
|
1,
|
|
3,
|
|
0,
|
|
"STRING"
|
|
]
|
|
],
|
|
"nodes": [
|
|
{
|
|
"flags": {},
|
|
"id": 1,
|
|
"inputs": [],
|
|
"mode": 0,
|
|
"order": 0,
|
|
"outputs": [
|
|
{
|
|
"links": [
|
|
1
|
|
],
|
|
"name": "index",
|
|
"slot_index": 0,
|
|
"type": "INT"
|
|
},
|
|
{
|
|
"links": [
|
|
2
|
|
],
|
|
"name": "index_str",
|
|
"slot_index": 1,
|
|
"type": "STRING"
|
|
}
|
|
],
|
|
"pos": [
|
|
200,
|
|
200
|
|
],
|
|
"properties": {
|
|
"Node name for S&R": "HoldCounter"
|
|
},
|
|
"size": [
|
|
260,
|
|
220
|
|
],
|
|
"type": "HoldCounter",
|
|
"widgets_values": [
|
|
2,
|
|
0,
|
|
4,
|
|
"loop",
|
|
"{:04d}",
|
|
0,
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"flags": {},
|
|
"id": 2,
|
|
"inputs": [
|
|
{
|
|
"link": null,
|
|
"name": "image",
|
|
"type": "IMAGE",
|
|
"widget": {
|
|
"name": "image"
|
|
}
|
|
}
|
|
],
|
|
"mode": 0,
|
|
"order": 1,
|
|
"outputs": [
|
|
{
|
|
"links": null,
|
|
"name": "IMAGE",
|
|
"type": "IMAGE"
|
|
},
|
|
{
|
|
"links": null,
|
|
"name": "MASK",
|
|
"type": "MASK"
|
|
}
|
|
],
|
|
"pos": [
|
|
520,
|
|
200
|
|
],
|
|
"properties": {
|
|
"Node name for S&R": "LoadImage"
|
|
},
|
|
"size": [
|
|
320,
|
|
314
|
|
],
|
|
"type": "LoadImage",
|
|
"widgets_values": [
|
|
"example.png",
|
|
"image"
|
|
]
|
|
},
|
|
{
|
|
"flags": {},
|
|
"id": 3,
|
|
"inputs": [
|
|
{
|
|
"link": 2,
|
|
"name": "source",
|
|
"type": "*"
|
|
}
|
|
],
|
|
"mode": 0,
|
|
"order": 2,
|
|
"outputs": [],
|
|
"pos": [
|
|
520,
|
|
540
|
|
],
|
|
"properties": {
|
|
"Node name for S&R": "PreviewAny"
|
|
},
|
|
"size": [
|
|
320,
|
|
80
|
|
],
|
|
"type": "PreviewAny"
|
|
}
|
|
],
|
|
"version": 0.4
|
|
} |