ComfyUI/app
Jedrzej Kosinski 2ff1d3d042 fix: make NodeReplaceManager.register() idempotent
When the same (old_node_id, new_node_id) pair is registered more than
once in the same process, the duplicate is now silently ignored (with a
debug log). Previously every call appended a new entry, so reloading a
custom node — e.g. via ComfyUI-Manager hot-reload — would accumulate
stale duplicate replacements that surfaced through GET /node_replacements.

Multiple distinct alternatives for the same old_node_id (different
new_node_ids) are still preserved, matching the existing 'list of
alternatives' design used by apply_replacements().

Adds unit tests in tests-unit/app_test/node_replace_manager_test.py
covering normal registration, multi-alternative support, dedupe, and
first-write-wins ordering.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019dd37c-4751-72ef-9927-3182b5825db0
2026-04-28 03:03:41 -07:00
..
assets fix(assets): recognize temp directory in asset category resolution (#13159) 2026-03-25 19:59:59 -07:00
database feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
__init__.py Add FrontendManager to manage non-default front-end impl (#3897) 2024-07-16 11:26:11 -04:00
app_settings.py Update frontend to v1.25.10 and revert navigation mode override (#9522) 2025-08-23 17:54:01 -04:00
custom_node_manager.py This should not be a warning. (#7946) 2025-05-05 07:49:07 -04:00
frontend_management.py Move parsing of requirements logic to function. (#12701) 2026-02-28 22:21:32 -05:00
logger.py Repeat frontend version warning at the end. 2025-03-12 07:13:40 -04:00
model_manager.py New Year ruff cleanup. (#11595) 2026-01-01 22:06:14 -05:00
node_replace_manager.py fix: make NodeReplaceManager.register() idempotent 2026-04-28 03:03:41 -07:00
subgraph_manager.py fix: specify UTF-8 encoding when reading subgraph files (#12563) 2026-02-21 15:05:00 -08:00
user_manager.py fix: atomic writes for userdata to prevent data loss on crash (#12987) 2026-03-16 21:56:35 -04:00