comfy-env-0.2.9
0.2.9
0.2.8
0.2.7
0.2.5
0.2.4
0.2.2
0.2.13
0.2.12
0.2.11
0.2.10
0.2.1
0.2.0
0.1.99
0.1.98
0.1.97
0.1.96
0.1.95
0.1.94
0.1.93
0.1.92
0.1.91
0.1.90
0.1.9
0.1.89
0.1.88
0.1.87
0.1.86
0.1.85
0.1.83
0.1.82
0.1.81
0.1.80
0.1.8
0.1.79
0.1.78
0.1.77
0.1.76
0.1.75
0.1.74
0.1.73
0.1.72
0.1.71
0.1.70
0.1.7
0.1.69
0.1.68
0.1.67
0.1.66
0.1.65
0.1.64
0.1.63
0.1.62
0.1.61
0.1.60
0.1.6
0.1.59
0.1.58
0.1.57
0.1.56
0.1.55
0.1.54
0.1.53
0.1.52
0.1.51
0.1.50
0.1.5
0.1.49
0.1.48
0.1.47
0.1.46
0.1.45
0.1.44
0.1.43
0.1.42
0.1.41
0.1.40
0.1.4
0.1.39
0.1.38
0.1.37
0.1.36
0.1.35
0.1.34
0.1.33
0.1.32
0.1.31
0.1.30
0.1.3
0.1.29
0.1.28
0.1.27
0.1.26
0.1.25
0.1.24
0.1.23
0.1.22
0.1.21
0.1.20
0.1.2
0.1.19
0.1.18
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.1
0.0.9
0.0.8
0.0.75
0.0.74
0.0.73
0.0.72
0.0.71
0.0.70
0.0.69
0.0.68
0.0.67
0.0.66
0.0.65
0.0.64
0.0.62
0.0.61
0.0.60
0.0.6
0.0.59
0.0.58
0.0.57
0.0.56
0.0.55
0.0.54
0.0.53
0.0.52
0.0.51
0.0.50
0.0.5
0.0.49
0.0.48
0.0.47
0.0.46
0.0.45
0.0.44
0.0.43
0.0.42
0.0.41
0.0.40
0.0.4
0.0.39
0.0.38
0.0.37
0.0.36
0.0.35
0.0.34
0.0.33
0.0.32
0.0.31
0.0.30
0.0.3
0.0.29
0.0.28
0.0.27
0.0.26
0.0.25
0.0.24
0.0.23
0.0.22
0.0.21
0.0.2
0.0.19
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.1
0.2.9
0.2.8
0.2.7
0.2.5
0.2.4
0.2.2
0.2.13
0.2.12
0.2.11
0.2.10
0.2.1
0.2.0
0.1.99
0.1.98
0.1.97
0.1.96
0.1.95
0.1.94
0.1.93
0.1.92
0.1.91
0.1.90
0.1.9
0.1.89
0.1.88
0.1.87
0.1.86
0.1.85
0.1.83
0.1.82
0.1.81
0.1.80
0.1.8
0.1.79
0.1.78
0.1.77
0.1.76
0.1.75
0.1.74
0.1.73
0.1.72
0.1.71
0.1.70
0.1.7
0.1.69
0.1.68
0.1.67
0.1.66
0.1.65
0.1.64
0.1.63
0.1.62
0.1.61
0.1.60
0.1.6
0.1.59
0.1.58
0.1.57
0.1.56
0.1.55
0.1.54
0.1.53
0.1.52
0.1.51
0.1.50
0.1.5
0.1.49
0.1.48
0.1.47
0.1.46
0.1.45
0.1.44
0.1.43
0.1.42
0.1.41
0.1.40
0.1.4
0.1.39
0.1.38
0.1.37
0.1.36
0.1.35
0.1.34
0.1.33
0.1.32
0.1.31
0.1.30
0.1.3
0.1.29
0.1.28
0.1.27
0.1.26
0.1.25
0.1.24
0.1.23
0.1.22
0.1.21
0.1.20
0.1.2
0.1.19
0.1.18
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.1
0.0.9
0.0.8
0.0.75
0.0.74
0.0.73
0.0.72
0.0.71
0.0.70
0.0.69
0.0.68
0.0.67
0.0.66
0.0.65
0.0.64
0.0.62
0.0.61
0.0.60
0.0.6
0.0.59
0.0.58
0.0.57
0.0.56
0.0.55
0.0.54
0.0.53
0.0.52
0.0.51
0.0.50
0.0.5
0.0.49
0.0.48
0.0.47
0.0.46
0.0.45
0.0.44
0.0.43
0.0.42
0.0.41
0.0.40
0.0.4
0.0.39
0.0.38
0.0.37
0.0.36
0.0.35
0.0.34
0.0.33
0.0.32
0.0.31
0.0.30
0.0.3
0.0.29
0.0.28
0.0.27
0.0.26
0.0.25
0.0.24
0.0.23
0.0.22
0.0.21
0.0.2
0.0.19
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.1
توضیحات
Environment management for ComfyUI custom nodes - CUDA wheel resolution and process isolation
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | comfy-env-0.2.9 |
| نام | comfy-env |
| نسخه کتابخانه | 0.2.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Andrea Pozzetti |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/comfy-env/ |
| مجوز | MIT |
# comfy-env
Environment management for ComfyUI custom nodes.
## Quick Start
```bash
pip install comfy-env
```
**1. Create `comfy-env-root.toml` in your node directory:**
```toml
[cuda]
packages = ["nvdiffrast", "pytorch3d"]
[apt]
packages = ["libgl1-mesa-glx"]
[node_reqs]
ComfyUI_essentials = "cubiq/ComfyUI_essentials"
```
PyPI deps go in `requirements.txt` (standard ComfyUI pattern).
**2. In `install.py`:**
```python
from comfy_env import install
install()
```
**3. In `prestartup_script.py`:**
```python
from comfy_env import setup_env
setup_env()
```
---
## Two Config Files
| File | Purpose |
|------|---------|
| `comfy-env-root.toml` | Main node config (root level) |
| `comfy-env.toml` | Isolated subfolder config |
### comfy-env-root.toml (main node)
```toml
[cuda]
packages = ["nvdiffrast", "pytorch3d"]
[apt]
packages = ["libgl1-mesa-glx"]
[dependencies]
cgal = "*"
[env_vars]
KMP_DUPLICATE_LIB_OK = "TRUE"
[node_reqs]
ComfyUI_essentials = "cubiq/ComfyUI_essentials"
```
PyPI deps -> `requirements.txt`
### comfy-env.toml (isolated folder)
```toml
python = "3.11"
[dependencies]
cgal = "*"
[pypi-dependencies]
trimesh = { version = "*", extras = ["easy"] }
[env_vars]
SOME_VAR = "value"
```
### What goes where?
| Section | Root | Isolated |
|---------|------|----------|
| `[cuda]` | [x] | [x] |
| `[apt]` | [x] | [x] |
| `[dependencies]` | [x] | [x] |
| `[env_vars]` | [x] | [x] |
| `[node_reqs]` | [x] | [ ] |
| `python = "X.Y"` | [ ] | [x] |
| `[pypi-dependencies]` | [ ] | [x] |
---
## Process Isolation
For nodes with conflicting dependencies:
```python
# In nodes/__init__.py
from pathlib import Path
from comfy_env import wrap_isolated_nodes
from .cgal import NODE_CLASS_MAPPINGS as cgal_mappings
NODE_CLASS_MAPPINGS = wrap_isolated_nodes(
cgal_mappings,
Path(__file__).parent / "cgal" # Has comfy-env.toml
)
```
Each wrapped node runs in a subprocess with its own Python environment.
---
## CLI
```bash
comfy-env init # Create comfy-env-root.toml
comfy-env init --isolated # Create comfy-env.toml (for subfolders)
comfy-env install # Install dependencies
comfy-env install --dry-run # Preview
comfy-env info # Show runtime info
comfy-env doctor # Verify packages
comfy-env apt-install # Install system packages
```
---
## API
### install()
```python
from comfy_env import install
install()
```
### setup_env()
```python
from comfy_env import setup_env
setup_env() # Call in prestartup_script.py
```
### wrap_isolated_nodes()
```python
from comfy_env import wrap_isolated_nodes
wrapped = wrap_isolated_nodes(NODE_CLASS_MAPPINGS, node_dir)
```
### Detection
```python
from comfy_env import RuntimeEnv, detect_cuda_version, detect_gpu
env = RuntimeEnv.detect()
print(env) # Python 3.11, CUDA 12.8, PyTorch 2.8.0, GPU: RTX 4090
```
---
## Example
See [ComfyUI-GeometryPack](https://github.com/PozzettiAndrea/ComfyUI-GeometryPack):
- Multiple isolated environments (CGAL, Blender, GPU)
- Per-subdirectory `comfy-env.toml`
- Different Python versions
---
## Why?
**Why isolation?** ComfyUI nodes share one Python. Conflicts happen when:
- Node A needs torch 2.4, Node B needs torch 2.8
- Two packages bundle incompatible libomp
- Blender API requires Python 3.11
**Why CUDA wheels?** Installing nvdiffrast normally needs CUDA toolkit + C++ compiler + 30 min compilation. [cuda-wheels](https://pozzettiandrea.github.io/cuda-wheels/) provides pre-built wheels.
**How envs work:**
- Central cache: `~/.comfy-env/envs/`
- Marker files link nodes -> cached envs
- Config hash in name -> changes create new envs
---
## License
MIT
نیازمندی
| مقدار | نام |
|---|---|
| - | numpy |
| - | pip>=21.0 |
| - | pre-commit |
| - | tomli-w>=1.0.0 |
| - | tomli>=2.0.0 |
| - | uv>=0.4.0 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl comfy-env-0.2.9:
pip install comfy-env-0.2.9.whl
نصب پکیج tar.gz comfy-env-0.2.9:
pip install comfy-env-0.2.9.tar.gz