41 Commits
Author SHA1 Message Date
Adam eee485b70c fix: promoted Saver widgets in subgraphs load prompts and refilter lists (#21)
When a Saver's load_saved / prompt_lists were promoted to subgraph inputs,
changing them on the subgraph node never ran the Saver's callbacks: the
prompt didn't load, the list didn't refilter, and the outer dropdowns kept
a stale snapshot of the options.

- Add js/subgraph_widgets.js (pure module): find the widget that supplies
  a value through nested subgraphs, and hook the subgraph node's outer
  widget callbacks to forward changes to opted-in nodes inside. Re-hooks
  on widget-promoted and when the frontend silently rebuilds an outer
  widget (input._widget slot watcher).
- Saver mirrors the outer widgets: outer changes run the normal callbacks;
  inner values and option lists are pushed back out, including to a
  Primitive feeding the subgraph node. Unchanged values are ignored so a
  Primitive's per-queue re-apply doesn't reset the selection.
- Save / Delete / load use the outer list name when promoted.
- Add plain Node tests (tests/), a mock workflow loader and the bug-report
  workflow as a fixture.
- Rename AGENT.md to AGENTS.md; document promoted widgets, testing and
  README style.
- Bump version to 1.8.1.
2026-10-31 01:02:41 -07:00
Adam 591aa08da4 feat: carry captured text forward across queued runs and tabs
- True runs remember captured text per (tab path, node) with a token.
  Off runs whose widget hadn't received it use the remembered text and
  update the embedded metadata. IS_CHANGED includes the carried token, so
  prompts queued ahead pick it up
- Scope pushed prompt updates to the tab the run was queued from, fixing
  captured text overwriting a same-id node in another open workflow
- Nodes fetch missed text when a workflow loads or its tab is re-opened
- In-memory only; tokens are compared by equality, so restarts are safe
- Saver and Passthrough get hidden stash_tab/stash_token inputs (appended
  last, no socket or widget, not saved in widgets_values)
2026-10-18 16:28:52 -07:00
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 e6b3fd3bc6 Add AGENT.md file 2026-10-17 16:04:05 -07:00
Adam b473c0467a fix: decide lazy text stripping from the queued prompt, error on missing text
The queue-time strip of the unused lazy "text" link read the canvas widget for
use_input_text. When use_input_text was linked to an external node, that widget
held a stale value, so the link could be stripped while the backend still
requested "text", raising NodeInputError.

- Decide from the API prompt itself: strip only when use_input_text is the
  literal false; keep the link when it is a link (value unknown until runtime).
- Match prompt entries by class_type instead of mapping canvas nodes to ids.
- check_lazy_status now raises a clear error when use_input_text is on but
  nothing is connected to "text", instead of the cryptic NodeInputError.
- Applies to both Prompt Stash Saver and Passthrough.
2026-10-17 15:48:44 -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 7849791c59 feat: strip unused lazy text link for Saver at queue time
Extend the graphToPrompt cache-invalidation workaround (previously
only on PromptStashPassthrough) to PromptStashSaver. When
use_input_text is false, the lazy "text" input is ignored by
check_lazy_status but still folds into ComfyUI's output cache key,
causing spurious invalidation of the node and everything downstream
whenever the upstream value changes (Comfy-Org/ComfyUI#11744).

We remove the dead "text" link from the API prompt at queue time,
matching how core drops orphaned links in graphToPrompt. The link is
left intact when use_input_text is true, preserving correct caching.
2026-07-04 16:02:46 -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 e04cecee66 fix: Nodes 2.0 support 2026-05-23 03:30:36 -07:00
Adam d737a69b61 Bump version: 1.4.1 2026-01-18 03:00:11 -08:00
Adam 2b64735aa8 Make pause to edit not change caching 2026-01-18 02:59:40 -08:00
Adam 81788676ef Add export metadata subgraph support. 2026-01-18 00:10:46 -08:00
Adam 0c5e1b9e9b Add JS subgraph support 2026-01-18 00:04:54 -08:00
Adam 653cd4f1c0 Improve JS eventListener cleanup 2026-01-17 21:52:54 -08:00
Adam 3a54760be5 Update combo lists to only exist on front end js 2026-01-03 15:27:22 -08:00
Adam 2e9309c9a3 Improve visibility of continue button 2025-12-05 18:53:14 -08:00
Adam 8a59bdf344 Update version 2025-08-23 04:27:54 -07:00
Adam fa8be634d7 Add import export 2025-08-23 04:05:18 -07:00
Adam 3f11c9c770 Add custom multi-button widget 2025-08-23 02:53:45 -07:00
Adam 494f32cca9 Moved data file to user directory. 2025-08-22 21:30:05 -07:00
Adam 932a461bfb Update the saving of prompt metadata and node changed detection. 2025-08-22 19:48:04 -07:00
Adam d8a523df91 Update README.md
Update pyproject.toml
2025-05-15 19:13:13 -07:00
Adam 7bff5c5308 feat: new simpler pass through node with pause feature 2025-05-12 01:25:02 -07:00
Adam a3272e33fa Merge pull request #3 from ComfyNodePRs/update-publish-yaml
Update Github Action for Publishing to Comfy Registry
2025-04-24 22:27:43 -07:00
Adam 641db79493 Update to support ComfyUI_frontend 1.16.x. Bump node ver to 1.1.6 2025-04-24 22:22:26 -07:00
Adam 4f7d725fea Update to new COMBO list box 2025-02-17 18:25:27 -08:00
snomiao edecbfb4dd chore(publish): update workflow for node publishing
- Add permissions for issue writing
- Modify condition to check repository owner instead of fork status
- Update action version for publish-node-action to v1
2025-01-25 07:55:36 +00:00
Adam 3400a6f5d1 Merge pull request #2 from ComfyNodePRs/publish
Add Github Action for Publishing to Comfy Registry
2024-12-27 23:07:26 -08:00
Adam ba77c5dfa6 Update publish.yml 2024-12-27 23:06:48 -08:00
Adam 2e63b80f4d Merge pull request #1 from ComfyNodePRs/pyproject
Add pyproject.toml for Custom Node Registry
2024-12-27 23:02:03 -08:00
snomiao 30ea8048f2 chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-12-20 23:35:36 +00:00
snomiao 76a17b253e chore(publish): Add Github Action for Publishing to Comfy Registry 2024-12-20 23:35:35 +00:00
Adam 27cb043c40 Fix overwriting save file on update 2024-11-12 18:49:43 -08:00
Adam f7bd9a9e6d Change use_input to always be false in the meta for restoring a workflow 2024-11-12 18:07:25 -08:00
Adam 11abb0bcf2 Fix bug where meta isn't saved from use_input_text properly. 2024-11-07 00:45:50 -08:00
Adam ee3dc3973b Add readme 2024-11-05 00:18:30 -08:00
Adam e40b971bd8 Update pyproject.toml 2024-11-03 19:46:03 -08:00
Adam 260f349595 Added option for multiple lists. 2024-11-03 19:31:28 -08:00
Adam 30b073d4ba Initial prompt memory saver node 2024-11-03 17:27:09 -08:00
Adam 4393476982 Initial commit 2024-11-03 16:36:03 -08:00