How to Fixed ComfyUI crashes or closes immediately on startup

In my case, I found 2 possible issue that cause ComfyUI trigger update & crashes on startup

Most Cause: Automatic update caused issue

  1. C:\Users\<YourUsername>\AppData\Roaming\ComfyUI\).
  2. Open the settings.json file in a text editor (like Notepad).
  3. Delete the line referencing the pending update, such as "pendingDownloadedUpdateVersion": "1.0.xx", and save the file.
  4. Relaunch ComfyUI Desktop.

Disable Custom Nodes / Safe Mode

A broken or outdated custom node (from ComfyUI-Manager) can crash the backend before the interface loads

  • Toggle Disable custom nodes on in your app settings or run ComfyUI with the safe/troubleshooting options.
  • Check or update your custom nodes by navigating to your custom_nodes folder and temporarily moving problem nodes out to test if startup succeeds

If I do not work try to check log file

  • Windows: %APPDATA%\Comfy Desktop\logs (app.log)
  • macOS: ~/Library/Logs/Comfy Desktop (app.log)
  • Linux: ~/.config/Comfy Desktop/logs (app.log)

And check Startup Flags if you found log pattern like this

torch.cuda.OutOfMemoryError: CUDA out of memory.
RuntimeError: CUDA out of memory. Tried to allocate...

Try to add --lowvram, or --disable-xformers to your launch configuration. --highvram (Force Comfy Load Model to VRAM that can cause out of memory.

Reference