Error ComfyUI refuses to run - Error: no available ports found between 8000 and 9000

I made a mistake in the ComfyUI GUI and changed the ComfyUI server from 127.0.0.1 to 127.0.0.1,192.168.10.10 - yep didn’t read the manual - my bad. But now regardless of what I do I get the same error message: Error: no available ports found between 8000 and 9000

I do a “netstat -oan | findstr :80” and nothing is taking up the ports. I have rebooted several times and still the same. I tied to install the comfyui-portiable version on a different drive, same error. I renamed all the folders in C:\ComfyUI, C:\users\pichezz\AppData\Roaming, and C:\Users\pichezz\AppData\Local, and then tried a fresh install of the comfyui.exe and it too fails with the same error.

HELP!

1 Like

Neat error! We should make sure this can’t happen.

If you installed to the default location, you should have a ComfyUI folder in your Documents. Please open this file in a text editor:

Documents\ComfyUI\user\default\comfy.settings.json

You should be able to find the two-IP string you set (with e.g. Ctrl + F). Just change that back to 127.0.0.1 and you should be good to go.

1 Like

yep looked at that file, but it doesn’t seem to hold the changes. I have two other PCs with ComfyUI and I looked at their files as well. I even thought of copy one of tehir JSON files over, but sadly the same exact error.

Out of frustration I did a check-point recovery / restore from 3 days ago. Now ComfyUI isn’t installed, and I can try and re-install. I get further, but the “ComfyUI Setup 0.4.72 - x64.exe“ thinks that python cannot be found now. In the past I thought python was installed by the app, or am I just tired and forgetting things now.

Yeah that’s a hard link issue from deleting the destination file by the look of it.

If you have a decent internet connection, the fastest solution is to just delete the .venv folder in your Documents\ComfyUI, and backup/delete (or just move) your user/default/comfy.settings.json file.

This should regenerate everything on next load. If it doesn’t, please let us know - there’s more to do and we want to fix this so it doesn’t happen to you or anyone else again.

Sadly, still no joy. Screen cap of the error and the log file:

sorry cannot upload the main.log file so here is the tail:

[2025-09-18 17:59:57.663] [info]  Created directory: C:\Users\pichezz\ComfyUI\models\LLM
[2025-09-18 17:59:57.663] [info]  Created directory: C:\Users\pichezz\ComfyUI\models\Joy_caption
[2025-09-18 17:59:57.666] [info]  Settings file C:\Users\pichezz\ComfyUI\user\default\comfy.settings.json does not exist. Using default settings.
[2025-09-18 17:59:57.667] [info]  Wrote install options to comfy settings file.
[2025-09-18 17:59:57.668] [info]  Creating model config files in C:\Users\pichezz\AppData\Roaming\ComfyUI\extra_models_config.yaml
[2025-09-18 17:59:57.672] [info]  Created extra_model_paths.yaml at C:\Users\pichezz\AppData\Roaming\ComfyUI\extra_models_config.yaml
[2025-09-18 17:59:57.673] [info]  Using uv at C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\uv\win\uv.exe
[2025-09-18 17:59:57.676] [info]  Creating virtual environment at C:\Users\pichezz\ComfyUI\.venv with python 3.12
[2025-09-18 17:59:57.676] [info]  Running uv command: & "C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\uv\win\uv.exe" "venv" "--python" "3.12" "--python-preference" "only-managed"
[2025-09-18 17:59:57.798] [info]  Received renderer-ready message!
[2025-09-18 17:59:57.799] [info]  Sending queued message {"channel":"loading-progress","data":{"status":"python-setup"}}
[2025-09-18 17:59:57.808] [info]  
[2025-09-18 17:59:57.862] [info]  Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindowse]0;C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exea
[2025-09-18 17:59:57.871] [info]  
[2025-09-18 17:59:58.003] [info]  PS C:\Users\pichezz\ComfyUI> 
[2025-09-18 17:59:58.072] [info]  
[2025-09-18 17:59:58.089] [info]  > &
[2025-09-18 17:59:58.108] [info]  > & "C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\uv\win\uv.exe" "venv" "--python" "3.12" "--python-preference" "only-managed"

[2025-09-18 17:59:58.298] [info]  error
[2025-09-18 17:59:58.316] [info]  : Python interpreter not found at `C:\Users\pichezz\AppData\Roaming\uv\python\cpython-3.12.11-windows-x86_64-none\python.exe`

[2025-09-18 17:59:58.340] [info]  PS C:\Users\pichezz\ComfyUI> 
[2025-09-18 17:59:58.358] [info]  > echo "_-end-1758232797676:$?"

[2025-09-18 17:59:58.395] [info]  _-end-1758232797676:False
[2025-09-18 17:59:58.411] [error] Error creating virtual environment: Error: Failed to create virtual environment: exit code -999
    at VirtualEnvironment.createVenvWithPython (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:25336:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async descriptor.value (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:25051:9)
    at async VirtualEnvironment.createEnvironment (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:25307:9)
    at async VirtualEnvironment.create (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:25252:7)
    at async _InstallationManager2.freshInstall (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:26386:5)
    at async _InstallationManager2.ensureInstalled (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:26242:31)
    at async DesktopApp.initializeInstallation (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:27541:14)
    at async DesktopApp.start (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:27556:26)
    at async startApp (C:\Users\pichezz\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\app.asar\.vite\build\main.cjs:27729:3)

Oh and please recall that I deleted and cleared the trashcan of all the ComfyUI folders I could find.

非常感谢,我也是同样的问题,通过您的方法已解决!

2 Likes

Skip all this insanity and install from github… way less headaches. :exploding_head:

Translation: “Thank you very much, I had the same problem, and it has been resolved through your method!

I wish you much better luck than I but at least we are fining issues and hopefully improvements in the install process.

Translation: 我希望你的运气比我好得多,但至少我们发现了问题,并希望在安装过程中有所改善。

I would love to so, I went to GitHub and downloaded the files (ComfyUI-master.zip) and unzipped on my computer. I installed Python and added it to my path, installed pip, and then tried the install:

c:\ComfyUI\ComfyUI-master>python main.py
Checkpoint files will always be loaded safely.
Traceback (most recent call last):
  File "c:\ComfyUI\ComfyUI-master\main.py", line 147, in <module>
    import execution
  File "c:\ComfyUI\ComfyUI-master\execution.py", line 15, in <module>
    import comfy.model_management
  File "c:\ComfyUI\ComfyUI-master\comfy\model_management.py", line 237, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
                                  ~~~~~~~~~~~~~~~~^^
  File "c:\ComfyUI\ComfyUI-master\comfy\model_management.py", line 187, in get_torch_device
    return torch.device(torch.cuda.current_device())
                        ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\pichezz\AppData\Local\Programs\Python\Python313\Lib\site-packages\torch\cuda\__init__.py", line 1071, in current_device
    _lazy_init()
    ~~~~~~~~~~^^
  File "C:\Users\pichezz\AppData\Local\Programs\Python\Python313\Lib\site-packages\torch\cuda\__init__.py", line 403, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

And of course it errors out. This all must be intuitively obvious for folks, but for an old-fart like me it is driving me nutz!

Sad part is I have installed ComfyUI on two other systems with no issues at all. I am very tempted just to nuke the PC with a fresh copy of Windows 11 and start from scratch.

BTW these are the instructions I was following: How to install ComfyUI manually in different systems - ComfyUI

are there better ones?

Yikes. It looks like the rollback corrupted the cached files that uv uses (in its central system store).

C:\Users\pichezz\AppData\Roaming\uv\

Will result in re-downloading large python files, but removing the uv directory should allow you to actually run the desktop installer.

I’d recommend grabbing the latest version - v0.4.74. It has numerous fixes.

Bummer so more things might be broken that I don’t know about. Is there a verification and validation tool for ComfyUI

I can check and see if there’s a way to have Astral’s uv verify its cache. It would be great to hear if anyone else is having the issue (please let us know so it can be prioritised!).

The desktop app is “reasonably robust” in recent versions, considering the complexity of everything it needs to handle under the hood. When we find things that we can automatically repair, we just add them directly to the desktop app itself. The “troubleshooting” screen has a number of these that you can run manually (filtered by default, if you have errors).

I followed this guide and it was flawless for me, at least. :sweat_smile:

I just found out that part of the confusion is that there are two versions of ComfyUI. I started with the installation from the ComfyUI.org site and not the python (AKA portable) version. It looks like the one that is acting up is now a combination of both installs. The other two that work are the “Electron” versions. Yes I used Grok to do some research and when i get it the path of my desktop launcher is when I found out about the versions.

Is there a reason to use one over the other? I haven’t been using the portable since I found that the manager wasn’t installing the models into the folders that they would download but I’d have to read the FAQ and then move them in the proper folders.

Or am I just senile and cannot read instructions properly?

BTW I do appreciate all the help

Comfy Desktop

The desktop app is what we intend for most people to use. It’s what we’re working on right now, to make installing and using the app easier. Expect new features and stability improvements to be rolling out here. Some features we’re working on are only possible in a desktop app.

Windows Portable

Portable was the original solution for users to get a working install of ComfyUI with as little setup effort as possible. It’s more what you would expect as a software developer, than as an app user - it’s still just a git repository and raw files - but it comes already setup, and is pretty convenient. I would not expect many updates on usability here. It will always just open in a browser, which adds some limitations.

What applies to both

When you download desktop OR portable, you should get the same core version of ComfyUI (a stable release). The differences are in how they are downloaded, installed, and managed.

Edit: You’re most welcome! And all good, this is on us - I don’t think we don’t make this very clear. I’m pinging internally to see if we can.

Ok, so I would love to start over from scratch. What is the best way to remove ComfyUI Desktop and possibly the portable version as well. Just renaming the C:\ComfyUI to footer or anything else doesn’t seem to fix the uninstall. There seems to be data stored in appData and other locations as well.

If I had a clean slate then one of the installs / re-installs might work better.

Desktop is much more like other Windows apps. If you check Windows’ Installed Apps (in Windows Settings), you should see e.g. ComfyUI 0.4.74 there.

Uninstall and reinstall

If you have not cleaned your system uv cache, please see the last section.

  1. Uninstall the existing version
  2. Install the latest version from: Download ComfyUI: Most Powerful Open Source Node-Based AI application for Full Control Over Image, Video, & 3D Generation

Deeper clean

If you still have troubles, the latest uninstaller has many clean up options.

  1. Uninstall app version 0.4.74 or higher
  2. Select Custom mode
  3. Pick anything here you’d like to remove - the top four will clean everything except downloaded models / any content you created
  4. Reinstall

Clean system UV cache

The only manual thing you may need is if you haven’t yet cleaned up your system uv cache:

Default system uv cache location on Windows (you can paste this into File Explorer):

%APPDATA%\uv\

# From logs, it should be:
C:\Users\pichezz\AppData\Roaming\uv\

If you’re using PowerShell:

Remove-Item -Recurse $env:APPDATA\uv