Comfy-Org / Comfy-Org/ComfyUI-Manager

comfyui-manager should never upgrade torch, torchvision or torchaudio; numpy and opencv require complex logic

Open
#2,240 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16.1k
Forks
2.5k
Avg merge
5d 4h
Merged PRs (30d)
13

Description

##### `torch`
The overrides when using `pip` or `uv` should basically freeze the currently installed torch, torchvision, torchaudio

##### `numpy`
anything that requires jax will require numpy >= 2
the numpy 1.x issue is related to opencv

it is basically always safe to upgrade numpy except in containers like nvidia's, where the packages are built against numpy 1. this means you will want to freeze numpy depending on the environment, which is complex. you can enumerate all the packages in the venv and determine which one is required.

##### `opencv`
There are four opencv packages:

```
opencv-python
opencv-contrib-python
opencv-python-headless
opencv-contrib-python-headless
```

the controlnet aux package is radioactive in that it installs an opencv package that requires numpy 1.x even though it doesn't have metadata as such. So you must always use `4.12.0.88` or higher. If there is a currently installed non-headless opencv-python or opencv-contrib-python, you must get the path to the package (sometimes in dist-packages, not always in site-packages, due to packaging in images like Runpod), uninstall it, rm -rf the path, and then install the corresponding headless package. It's a completely stylistic choice whether or not to use the contrib packages, the most notable thing in them is tracking features.

all the opencv packages specified by nodes should be ignored, and the installation must always firs tuninstall all currently installed opencv, then install exactly opencv-contrib-python-headless or opencv-python-headless >= 4.12.0.88

##### `transformers`

It should be >=4.54, the whole 4.53 series should have been yanked

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.