ComfyUI Extension
ComfyUI-exit
Custom node to exit ComfyUI. Exit ComfyUI after a specified number of seconds.
watarika/ComfyUI-exit
Nodes—
On cloudLocal install
Stars0
Updated11 months ago
Readme
ComfyUI-exit
[English][<a href="README_ja.md">日本語</a>]
Custom node to exit ComfyUI.
Exit when Last Batch
This custom node automatically terminates ComfyUI once all its executions have finished.
It does not immediately shut down when it appears that “the number of remaining batches is 0”. Instead, it rechecks multiple times after a set delay before terminating.
Features
- Simply place it at the end of the graph to automatically terminate after all batches complete
- With rechecks: After
confirm_delay_secseconds, it rechecks/queueconfirm_attemptstimes atconfirm_interval_sec-second intervals. If it's 0 every time, it exits. - Force exit/Normal exit selectable (
os._exit(0)/sys.exit(0)) - Utilizes ComfyUI's HTTP
/queueAPI (operates without external extensions)
Parameters
any: Dummy input for the terminal node. Connect it to the output of the final node.confirm_delay_sec(int): After the initial “0 remaining” determination, the wait time (in seconds) before starting rechecks. Allows time for saving or post-processing.confirm_attempts(int): Number of retry attempts. The process ends when all attempts show consecutive 0s.confirm_interval_sec(int): Interval between each retry attempt.base_url(str): ComfyUI base URL. Change if running outside localhost. Example:http://127.0.0.1:8188hard_exit(bool):Truefor guaranteed immediate shutdown viaos._exit(0),Falseforsys.exit(0)(normal shutdown if possible).http_timeout_sec(int): Timeout in seconds for fetching/queue.
Recommended Settings
- Generally, default settings are fine
- For local operation or simple storage only:
confirm_delay_sec=3~5,confirm_attempts=2~3,confirm_interval_sec=2~3,hard_exit=True - If downstream processes require custom post-processing and you “prefer normal termination whenever possible”:
Consider setting
hard_exit=False
Exit ComfyUI
Exit ComfyUI after a specified number of seconds.
Use this node if you want Google Colab to automatically terminate after mass generation. It is necessary to disconnect and delete the Google Colab runtime on the Notebook side.
Fetch API
Sends a request to the specified URL.
Change Log
- V1.2.0 (September 29, 2025)
- Added
Exit when Last Batchnode
- Added
- V1.1.0 (December 31, 2024)
- Added
Fetch APInode
- Added
- v1.0.0 (December 13, 2024)
- Released
Exit ComfyUInode
- Released