Comfy-Org / Comfy-Org/ComfyUI

Issue when trying to install Florence2

Open
#6,977 1 comment 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Expected Behavior

This should be loading comfy UI normally.

### Actual Behavior

Once I installed the florence2 addon I am now having issues loading Comfy UI. I don't understand what this code is asking from me.

### Steps to Reproduce

Ever time I load Comfy UI this happens

### Debug Logs

```powershell
`Traceback (most recent call last):
File "C:\Users\Lucky Luciano\ComfyUI\ComfyUI\main.py", line 134, in
import comfy.utils
File "C:\Users\Lucky Luciano\ComfyUI\ComfyUI\comfy\utils.py", line 20, in
import torch
File "C:\Users\Lucky Luciano\ComfyUI\python_embeded\Lib\site-packages\torch\__init__.py", line 990, in
raise ImportError(
ImportError: Failed to load PyTorch C extensions:
It appears that PyTorch has loaded the `torch/_C` folder
of the PyTorch repository rather than the C extensions which
are expected in the `torch._C` namespace. This can occur when
using the `install` workflow. e.g.
$ python setup.py install && python -c "import torch"

This error can generally be solved using the `develop` workflow
$ python setup.py develop && python -c "import torch" # This should succeed
or by running Python from a different directory.

C:\Users\Lucky Luciano\ComfyUI>pause
Press any key to continue . . .`
```

### Other

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with main.py and comfy/utils.py, then inspect the embedded Python environment and the torch installation referenced in the traceback. Reproduce the startup failure after installing the Florence2 addon and determine whether ComfyUI is importing the intended PyTorch package. Done means ComfyUI loads normally and the startup traceback no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.