Skip to content

Conversation

@lixiang007666
Copy link

@lixiang007666 lixiang007666 commented Dec 26, 2025

Reason

We reproduced a scenario where an exception triggers handle_execution_error and the code path accesses:

class_type = prompt[node_id]["class_type"]

If the reported node_id is modified to a non-existent ID, this lookup can raise (e.g., KeyError), causing the
prompt_worker thread to crash.

After that, ComfyUI still appears to accept requests and successfully put them into the queue
("got prompt" looks normal), but since prompt_worker is no longer alive, the queue is never consumed.

This results in a silent “accept but not execute” state.

This PR is done:

The goal of this PR is to prevent ComfyUI from getting into a state where it accepts requests but does not process them, by adopting a fail-fast that terminates the process immediately.

@comfyanonymous

@lixiang007666
Copy link
Author

@Kosinkadink @guill @comfyanonymous
I’d appreciate it if you could take some time to review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant