Commit Graph
5 Commits
Author SHA1 Message Date
Adam 08b2582d13 feat: add Every Nth Queue node for cache-friendly periodic input
Add PromptStashEveryNthQueue, a BOOLEAN node that outputs True once every
N queued runs. The countdown is stored only in the frontend
(node.properties) and resolved in a widget beforeQueued hook into a hidden
`value` widget, so the backend sees just a constant. Off runs share one
cache key, so nothing downstream re-runs. The node has a status line
("True next run" / "True in N runs") and Next / Delay +1 / Reset buttons.
Partial runs don't advance the countdown, and muted or bypassed nodes are
skipped.

Saver and Passthrough now follow a linked use_input_text to constant
boolean sources (Every Nth Queue, core PrimitiveBoolean) via
resolveConstantBool. When the value is false they strip the unused lazy
`text` link, keeping upstream nodes out of the cache key.
2026-10-17 18:57:56 -07:00
Adam 52ebe72556 feat: sort lists, meta output, and preserve custom widget labels
- Manager: add "Sort A-Z" button that sorts the selected list's prompts
  case-insensitively and persists the new order (closes #20)
- Saver: add second "meta" STRING output with JSON describing the prompt
  (prompt_name, list_name, source, etc.) for downstream nodes (closes #19)
- Saver: include save_as_key/load_saved/prompt_lists in IS_CHANGED so a
  cached meta output stays accurate
- All nodes: only apply default widget labels when the user hasn't set a
  custom one, so renames survive reload (#13)
- Bump version to 1.7.0
2026-09-13 16:55:58 -07:00
Adam 5c46906a93 fix: compare node ids as strings for server-pushed events
ComfyUI frontend 1.46 (PR #13085) brands LGraphNode.id as a string, so
node.id is "5" where it used to be 5. nodeMatchesUniqueId() strict-compared
the backend UNIQUE_ID as a Number against node.id and therefore returned
false for every node, silently dropping all events routed through it:

- prompt-stash-update-prompt: prompt_text never updated in the node when
  Use Input ran (execution was unaffected, only the widget was)
- prompt-stash-set-continue: the Continue button never appeared, leaving
  Pause to Edit stuck until "Clear All Paused"

Compare ids as strings and stop Number-mapping the subgraph path; object
key lookup coerces to string, so getNodeById() still resolves on both old
and new frontends.

Also replace the four `this.id === -1` guards, dead for the same reason,
with a shared isUnassignedNode() helper.

Backward compatible with frontends before 1.46.
2026-08-03 01:49:00 -07:00
Adam 51b30ea893 feat: support Primitive node connections for load_saved / prompt_lists combos
Declare the combos as COMBO inputs so they get connectable sockets, expose
their live options to Primitives via a runtime GET_CONFIG override, and
sync/re-render connected Primitives (including a Nodes 2.0 reactivity nudge)
on list change, server update, and refresh.
2026-06-06 21:01:28 -07:00
Adam 0c5e1b9e9b Add JS subgraph support 2026-01-18 00:04:54 -08:00