Comfy-Org / Comfy-Org/ComfyUI-Manager
Bug: Version parsing error when handling torchaudio==2.6.0+cu126
- Dominant language
- Python
- Stars
- 16.1k
- Forks
- 2.5k
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 13
Description
### Describe the bug
When installing or updating a custom node with a dependency like `torchaudio==2.6.0+cu126`, the ComfyUI-Manager throws the following error:
invalid literal for int() with base 10: '0+cu126'
This is due to attempting to parse the version string `'2.6.0+cu126'` as a dot-separated string and converting its patch version to `int()`, which fails because `'0+cu126'` is not a valid integer.
---
### Steps to reproduce
1. Use a custom node with `requirements.txt` that includes `torchaudio>=0.13.0`
2. Ensure `torchaudio==2.6.0+cu126` is already installed
3. Let ComfyUI-Manager attempt dependency installation
4. Observe error
---
### Expected behavior
ComfyUI-Manager should correctly parse PEP 440-compliant version strings such as `2.6.0+cu126` using a robust method, such as `packaging.version.parse`, instead of string splitting + `int()`.
---
### Proposed fix
Use `packaging.version` for safe version parsing:
```python
from packaging import version
v = version.parse("2.6.0+cu126")
v.major # 2
v.minor # 6
v.micro # 0
This would allow the Manager to handle CUDA-tagged builds of PyTorch packages (like torch, torchaudio, torchvision, etc.) without crashing.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.