Compare commits

...

4 Commits

Author SHA1 Message Date
Vinci
0ccb89346d
Merge 45ff6ad953 into 9c34f5f36a 2026-05-06 21:35:29 +08:00
Vinci
45ff6ad953
Merge branch 'master' into fix/guard-unregistered-class-type 2026-04-25 08:22:09 +08:00
Vinci
24587d8464
Merge branch 'master' into fix/guard-unregistered-class-type 2026-04-25 08:21:30 +08:00
cest-la-v
4b672ff45b fix: guard against unregistered class_type in _is_intermediate_output
Commit 3696c5ba introduced _is_intermediate_output which iterates over
all node IDs in the prompt after execution, including orphan/disconnected
nodes that are never validated or executed. If any such node's class_type
is not in NODE_CLASS_MAPPINGS (e.g. a custom node pack that failed to
load or was renamed), NODE_CLASS_MAPPINGS[class_type] raises KeyError.

This exception short-circuits the while...else block, preventing:
- execution_success from being sent to the frontend
- self.history_result from being assigned

Images are still saved to disk since SaveImage runs during the main
execution loop, but the Gallery plugin never receives the success event
and the /history API returns incomplete data.

Fix: use .get() with a None guard so unregistered nodes are silently
treated as non-intermediate-output nodes.
2026-04-25 00:51:56 +08:00

View File

@ -414,7 +414,9 @@ def format_value(x):
def _is_intermediate_output(dynprompt, node_id):
class_type = dynprompt.get_node(node_id)["class_type"]
class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
class_def = nodes.NODE_CLASS_MAPPINGS.get(class_type)
if class_def is None:
return False
return getattr(class_def, 'HAS_INTERMEDIATE_OUTPUT', False)
def _send_cached_ui(server, node_id, display_node_id, cached, prompt_id, ui_outputs):