Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To install and run windows 11 -- torch #150

Open
LucasMoskun opened this issue Aug 2, 2024 · 4 comments
Open

Unable To install and run windows 11 -- torch #150

LucasMoskun opened this issue Aug 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@LucasMoskun
Copy link

Describe the bug
I follow the instructions to install and run from the readme

To Reproduce

python -m venv venv
.\venv\Scripts\activate
python -m pip install --upgrade pip
pip install comfy-cli
comfy --workspace=ComfyUI install
comfy set-default ComfyUI
comfy launch

Expected behavior
I would expect comfyui to launch.

Actual behavior
It fails to import torch

Launching ComfyUI from: C:\nilor-corp-temp\ComfyUI

[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-08-02 21:02:57.211501
** Platform: Windows
** Python version: 3.12.4 (tags/v3.12.4:8e8a4ba, Jun  6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)]
** Python executable: C:\nilor-corp-temp\venv\Scripts\python.exe
** ComfyUI Path: C:\nilor-corp-temp\ComfyUI
** Log path: C:\nilor-corp-temp\ComfyUI\comfyui.log

Prestartup times for custom nodes:
   0.9 seconds: C:\nilor-corp-temp\ComfyUI\custom_nodes\ComfyUI-Manager

Traceback (most recent call last):
  File "C:\nilor-corp-temp\ComfyUI\main.py", line 83, in <module>
    import comfy.utils
  File "C:\nilor-corp-temp\ComfyUI\comfy\utils.py", line 1, in <module>
    import torch
  File "C:\nilor-corp-temp\venv\Lib\site-packages\torch\__init__.py", line 148, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\nilor-corp-temp\venv\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
CompletedProcess(args=['C:\\nilor-corp-temp\\venv\\Scripts\\python.exe', 'main.py'], returncode=1)

Additional context
Add any other context about the problem here.

@LucasMoskun LucasMoskun added the bug Something isn't working label Aug 2, 2024
@LucasMoskun
Copy link
Author

python: 3.12.4
cuda: 12.1

@LucasMoskun
Copy link
Author

to get it to run I had to:
run ComfyUI/main.py with the --windows-standalone-build as described here:
comfyanonymous/ComfyUI#3703 (comment)

And then uninstall torch: pip uninstall torch

then reinstall pytorch: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 (https://pytorch.org/)

and then comfy launch works again.

@robinjhuang
Copy link
Member

I believe this is because torch 2.40 was broken for windows. Should be fine now if you try it.

@robinjhuang
Copy link
Member

Fixed in 2.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants