comfy-env 0.0.65__tar.gz → 0.0.67__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. {comfy_env-0.0.65 → comfy_env-0.0.67}/PKG-INFO +23 -92
  2. {comfy_env-0.0.65 → comfy_env-0.0.67}/README.md +21 -90
  3. {comfy_env-0.0.65 → comfy_env-0.0.67}/pyproject.toml +2 -5
  4. comfy_env-0.0.67/src/comfy_env/__init__.py +108 -0
  5. comfy_env-0.0.67/src/comfy_env/cli.py +336 -0
  6. comfy_env-0.0.67/src/comfy_env/config/__init__.py +19 -0
  7. comfy_env-0.0.67/src/comfy_env/config/parser.py +151 -0
  8. comfy_env-0.0.67/src/comfy_env/config/types.py +64 -0
  9. comfy_env-0.0.67/src/comfy_env/install.py +171 -0
  10. comfy_env-0.0.67/src/comfy_env/isolation/__init__.py +9 -0
  11. comfy_env-0.0.67/src/comfy_env/isolation/wrap.py +351 -0
  12. {comfy_env-0.0.65 → comfy_env-0.0.67}/src/comfy_env/nodes.py +2 -2
  13. comfy_env-0.0.67/src/comfy_env/pixi/__init__.py +48 -0
  14. comfy_env-0.0.67/src/comfy_env/pixi/core.py +356 -0
  15. {comfy_env-0.0.65/src/comfy_env → comfy_env-0.0.67/src/comfy_env/pixi}/resolver.py +1 -14
  16. comfy_env-0.0.67/src/comfy_env/prestartup.py +60 -0
  17. comfy_env-0.0.67/src/comfy_env/templates/comfy-env-instructions.txt +46 -0
  18. comfy_env-0.0.67/src/comfy_env/templates/comfy-env.toml +118 -0
  19. comfy_env-0.0.67/src/comfy_env/workers/__init__.py +38 -0
  20. {comfy_env-0.0.65 → comfy_env-0.0.67}/src/comfy_env/workers/base.py +1 -1
  21. comfy_env-0.0.65/src/comfy_env/workers/torch_mp.py → comfy_env-0.0.67/src/comfy_env/workers/mp.py +47 -14
  22. comfy_env-0.0.65/src/comfy_env/workers/venv.py → comfy_env-0.0.67/src/comfy_env/workers/subprocess.py +397 -443
  23. comfy_env-0.0.65/src/comfy_env/__init__.py +0 -162
  24. comfy_env-0.0.65/src/comfy_env/cli.py +0 -466
  25. comfy_env-0.0.65/src/comfy_env/decorator.py +0 -700
  26. comfy_env-0.0.65/src/comfy_env/env/__init__.py +0 -46
  27. comfy_env-0.0.65/src/comfy_env/env/config.py +0 -191
  28. comfy_env-0.0.65/src/comfy_env/env/config_file.py +0 -706
  29. comfy_env-0.0.65/src/comfy_env/env/manager.py +0 -636
  30. comfy_env-0.0.65/src/comfy_env/env/security.py +0 -267
  31. comfy_env-0.0.65/src/comfy_env/install.py +0 -449
  32. comfy_env-0.0.65/src/comfy_env/ipc/__init__.py +0 -55
  33. comfy_env-0.0.65/src/comfy_env/ipc/bridge.py +0 -476
  34. comfy_env-0.0.65/src/comfy_env/ipc/protocol.py +0 -265
  35. comfy_env-0.0.65/src/comfy_env/ipc/tensor.py +0 -371
  36. comfy_env-0.0.65/src/comfy_env/ipc/torch_bridge.py +0 -401
  37. comfy_env-0.0.65/src/comfy_env/ipc/transport.py +0 -318
  38. comfy_env-0.0.65/src/comfy_env/ipc/worker.py +0 -221
  39. comfy_env-0.0.65/src/comfy_env/isolation.py +0 -310
  40. comfy_env-0.0.65/src/comfy_env/pixi.py +0 -760
  41. comfy_env-0.0.65/src/comfy_env/registry.py +0 -130
  42. comfy_env-0.0.65/src/comfy_env/stub_imports.py +0 -270
  43. comfy_env-0.0.65/src/comfy_env/stubs/__init__.py +0 -1
  44. comfy_env-0.0.65/src/comfy_env/stubs/comfy/__init__.py +0 -6
  45. comfy_env-0.0.65/src/comfy_env/stubs/comfy/model_management.py +0 -58
  46. comfy_env-0.0.65/src/comfy_env/stubs/comfy/utils.py +0 -29
  47. comfy_env-0.0.65/src/comfy_env/stubs/folder_paths.py +0 -71
  48. comfy_env-0.0.65/src/comfy_env/templates/comfy-env-instructions.txt +0 -103
  49. comfy_env-0.0.65/src/comfy_env/templates/comfy-env.toml +0 -177
  50. comfy_env-0.0.65/src/comfy_env/wheel_sources.yml +0 -141
  51. comfy_env-0.0.65/src/comfy_env/workers/__init__.py +0 -49
  52. comfy_env-0.0.65/src/comfy_env/workers/pool.py +0 -241
  53. {comfy_env-0.0.65 → comfy_env-0.0.67}/.github/workflows/publish.yml +0 -0
  54. {comfy_env-0.0.65 → comfy_env-0.0.67}/.gitignore +0 -0
  55. {comfy_env-0.0.65 → comfy_env-0.0.67}/LICENSE +0 -0
  56. {comfy_env-0.0.65 → comfy_env-0.0.67}/src/comfy_env/errors.py +0 -0
  57. /comfy_env-0.0.65/src/comfy_env/env/cuda_gpu_detection.py → /comfy_env-0.0.67/src/comfy_env/pixi/cuda_detection.py +0 -0
  58. {comfy_env-0.0.65/src/comfy_env/env → comfy_env-0.0.67/src/comfy_env/pixi}/platform/__init__.py +0 -0
  59. {comfy_env-0.0.65/src/comfy_env/env → comfy_env-0.0.67/src/comfy_env/pixi}/platform/base.py +0 -0
  60. {comfy_env-0.0.65/src/comfy_env/env → comfy_env-0.0.67/src/comfy_env/pixi}/platform/darwin.py +0 -0
  61. {comfy_env-0.0.65/src/comfy_env/env → comfy_env-0.0.67/src/comfy_env/pixi}/platform/linux.py +0 -0
  62. {comfy_env-0.0.65/src/comfy_env/env → comfy_env-0.0.67/src/comfy_env/pixi}/platform/windows.py +0 -0
  63. {comfy_env-0.0.65 → comfy_env-0.0.67}/src/comfy_env/workers/tensor_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.65
3
+ Version: 0.0.67
4
4
  Summary: Environment management for ComfyUI custom nodes - CUDA wheel resolution and process isolation
5
5
  Project-URL: Homepage, https://github.com/PozzettiAndrea/comfy-env
6
6
  Project-URL: Repository, https://github.com/PozzettiAndrea/comfy-env
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Requires-Python: >=3.10
20
- Requires-Dist: pyyaml>=6.0
20
+ Requires-Dist: tomli-w>=1.0.0
21
21
  Requires-Dist: tomli>=2.0.0; python_version < '3.11'
22
22
  Requires-Dist: uv>=0.4.0
23
23
  Provides-Extra: dev
@@ -68,8 +68,7 @@ Create a `comfy-env.toml` in your node directory:
68
68
 
69
69
  ```toml
70
70
  [cuda]
71
- nvdiffrast = "0.4.0"
72
- pytorch3d = "0.7.9"
71
+ packages = ["nvdiffrast", "pytorch3d"]
73
72
 
74
73
  [packages]
75
74
  requirements = ["transformers>=4.56", "pillow"]
@@ -152,12 +151,6 @@ comfy-env install
152
151
  # Dry run (show what would be installed)
153
152
  comfy-env install --dry-run
154
153
 
155
- # Resolve wheel URLs without installing
156
- comfy-env resolve nvdiffrast==0.4.0
157
-
158
- # List all packages in the built-in registry
159
- comfy-env list-packages
160
-
161
154
  # Verify installation
162
155
  comfy-env doctor
163
156
  ```
@@ -167,11 +160,9 @@ comfy-env doctor
167
160
  ### Simple Format (comfy-env.toml)
168
161
 
169
162
  ```toml
170
- # CUDA packages (uses built-in registry)
163
+ # CUDA packages from https://pozzettiandrea.github.io/cuda-wheels/
171
164
  [cuda]
172
- nvdiffrast = "0.4.0"
173
- pytorch3d = "0.7.9"
174
- torch-scatter = "2.1.2"
165
+ packages = ["nvdiffrast", "pytorch3d", "torch-scatter"]
175
166
 
176
167
  # Regular pip packages
177
168
  [packages]
@@ -185,7 +176,7 @@ requirements = ["transformers>=4.56", "pillow"]
185
176
  linux = ["libgl1", "libopengl0"] # apt packages
186
177
 
187
178
  [local.cuda]
188
- nvdiffrast = "0.4.0"
179
+ packages = ["nvdiffrast"]
189
180
 
190
181
  [local.packages]
191
182
  requirements = ["pillow", "numpy"]
@@ -196,82 +187,32 @@ python = "3.10"
196
187
  cuda = "12.8"
197
188
 
198
189
  [myenv.cuda]
199
- torch-scatter = "2.1.2"
190
+ packages = ["torch-scatter"]
200
191
 
201
192
  [myenv.packages]
202
193
  requirements = ["transformers>=4.56"]
203
-
204
- # Custom wheel templates (override built-in registry)
205
- [wheel_sources]
206
- my-custom-pkg = "https://my-server.com/my-pkg-{version}+cu{cuda_short}-{py_tag}-{platform}.whl"
207
- ```
208
-
209
- ## Writing Wheel Templates
210
-
211
- ### Template Variables
212
-
213
- | Variable | Example | Description |
214
- |----------|---------|-------------|
215
- | `{version}` | `0.4.0` | Package version |
216
- | `{cuda_version}` | `12.8` | Full CUDA version |
217
- | `{cuda_short}` | `128` | CUDA without dot |
218
- | `{cuda_major}` | `12` | CUDA major only |
219
- | `{torch_version}` | `2.8.0` | Full PyTorch version |
220
- | `{torch_mm}` | `28` | PyTorch major.minor no dot |
221
- | `{torch_dotted_mm}` | `2.8` | PyTorch major.minor with dot |
222
- | `{py_version}` | `3.10` | Python version |
223
- | `{py_short}` | `310` | Python without dot |
224
- | `{py_tag}` | `cp310` | Python wheel tag |
225
- | `{platform}` | `linux_x86_64` | Platform tag |
226
-
227
- ### Common Wheel URL Patterns
228
-
229
- **Pattern 1: Simple CUDA + Python**
230
- ```
231
- https://example.com/{package}-{version}+cu{cuda_short}-{py_tag}-{py_tag}-{platform}.whl
232
- ```
233
-
234
- **Pattern 2: CUDA + PyTorch**
235
- ```
236
- https://example.com/{package}-{version}+cu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl
237
- ```
238
-
239
- **Pattern 3: GitHub Releases**
240
- ```
241
- https://github.com/org/repo/releases/download/v{version}/{package}-{version}+cu{cuda_short}-{py_tag}-{platform}.whl
242
- ```
243
-
244
- ### How to Find the Right Template
245
-
246
- 1. Download a wheel manually from the source
247
- 2. Look at the filename pattern: `nvdiffrast-0.4.0+cu128torch28-cp310-cp310-linux_x86_64.whl`
248
- 3. Replace values with variables: `nvdiffrast-{version}+cu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl`
249
- 4. Prepend the base URL
250
-
251
- ### Testing Your Template
252
-
253
- ```bash
254
- comfy-env resolve my-package==1.0.0
255
194
  ```
256
195
 
257
- This shows the resolved URL without installing.
196
+ ## CUDA Wheels Index
258
197
 
259
- ### Adding Custom Wheel Sources
198
+ CUDA packages are installed from the [cuda-wheels](https://pozzettiandrea.github.io/cuda-wheels/) index, which provides pre-built wheels for:
260
199
 
261
- If a package isn't in the built-in registry, add it to your `comfy-env.toml`:
200
+ - **PyTorch Geometric**: torch-scatter, torch-cluster, torch-sparse, torch-spline-conv
201
+ - **NVIDIA**: nvdiffrast, pytorch3d, gsplat
202
+ - **Attention**: flash-attn, sageattention
203
+ - **Mesh Processing**: cumesh, cubvh
204
+ - **Others**: spconv, detectron2, lietorch, and more
262
205
 
263
- ```toml
264
- [cuda]
265
- my-custom-pkg = "1.0.0"
206
+ Wheels are automatically selected based on your GPU, CUDA version, PyTorch version, and Python version.
266
207
 
267
- [wheel_sources]
268
- my-custom-pkg = "https://my-server.com/my-custom-pkg-{version}+cu{cuda_short}-{py_tag}-{platform}.whl"
269
- ```
208
+ ### Supported Configurations
270
209
 
271
- Resolution order:
272
- 1. User's `[wheel_sources]` in comfy-env.toml (highest priority)
273
- 2. Built-in `wheel_sources.yml` registry
274
- 3. Error if not found
210
+ | GPU Architecture | CUDA | PyTorch |
211
+ |-----------------|------|---------|
212
+ | Blackwell (sm_100+) | 12.8 | 2.8+ |
213
+ | Ada/Hopper/Ampere (sm_80+) | 12.8 | 2.8 |
214
+ | Turing (sm_75) | 12.8 | 2.8 |
215
+ | Pascal (sm_60) | 12.4 | 2.4 |
275
216
 
276
217
  ## API Reference
277
218
 
@@ -299,7 +240,7 @@ env = RuntimeEnv.detect()
299
240
  print(env)
300
241
  # Python 3.10, CUDA 12.8, PyTorch 2.8.0, GPU: NVIDIA GeForce RTX 4090
301
242
 
302
- # Get template variables
243
+ # Get environment variables
303
244
  vars_dict = env.as_dict()
304
245
  # {'cuda_version': '12.8', 'cuda_short': '128', 'torch_mm': '28', ...}
305
246
  ```
@@ -344,16 +285,6 @@ print(get_gpu_summary())
344
285
  # GPU 0: NVIDIA GeForce RTX 5090 (sm_120) [Blackwell - CUDA 12.8]
345
286
  ```
346
287
 
347
- ## Built-in Package Registry
348
-
349
- Run `comfy-env list-packages` to see all packages in the built-in registry.
350
-
351
- The registry includes:
352
- - PyTorch Geometric packages (torch-scatter, torch-cluster, torch-sparse)
353
- - NVIDIA packages (nvdiffrast, pytorch3d, gsplat)
354
- - Flash Attention (flash-attn)
355
- - And more
356
-
357
288
  ## License
358
289
 
359
290
  MIT - see LICENSE file.
@@ -40,8 +40,7 @@ Create a `comfy-env.toml` in your node directory:
40
40
 
41
41
  ```toml
42
42
  [cuda]
43
- nvdiffrast = "0.4.0"
44
- pytorch3d = "0.7.9"
43
+ packages = ["nvdiffrast", "pytorch3d"]
45
44
 
46
45
  [packages]
47
46
  requirements = ["transformers>=4.56", "pillow"]
@@ -124,12 +123,6 @@ comfy-env install
124
123
  # Dry run (show what would be installed)
125
124
  comfy-env install --dry-run
126
125
 
127
- # Resolve wheel URLs without installing
128
- comfy-env resolve nvdiffrast==0.4.0
129
-
130
- # List all packages in the built-in registry
131
- comfy-env list-packages
132
-
133
126
  # Verify installation
134
127
  comfy-env doctor
135
128
  ```
@@ -139,11 +132,9 @@ comfy-env doctor
139
132
  ### Simple Format (comfy-env.toml)
140
133
 
141
134
  ```toml
142
- # CUDA packages (uses built-in registry)
135
+ # CUDA packages from https://pozzettiandrea.github.io/cuda-wheels/
143
136
  [cuda]
144
- nvdiffrast = "0.4.0"
145
- pytorch3d = "0.7.9"
146
- torch-scatter = "2.1.2"
137
+ packages = ["nvdiffrast", "pytorch3d", "torch-scatter"]
147
138
 
148
139
  # Regular pip packages
149
140
  [packages]
@@ -157,7 +148,7 @@ requirements = ["transformers>=4.56", "pillow"]
157
148
  linux = ["libgl1", "libopengl0"] # apt packages
158
149
 
159
150
  [local.cuda]
160
- nvdiffrast = "0.4.0"
151
+ packages = ["nvdiffrast"]
161
152
 
162
153
  [local.packages]
163
154
  requirements = ["pillow", "numpy"]
@@ -168,82 +159,32 @@ python = "3.10"
168
159
  cuda = "12.8"
169
160
 
170
161
  [myenv.cuda]
171
- torch-scatter = "2.1.2"
162
+ packages = ["torch-scatter"]
172
163
 
173
164
  [myenv.packages]
174
165
  requirements = ["transformers>=4.56"]
175
-
176
- # Custom wheel templates (override built-in registry)
177
- [wheel_sources]
178
- my-custom-pkg = "https://my-server.com/my-pkg-{version}+cu{cuda_short}-{py_tag}-{platform}.whl"
179
- ```
180
-
181
- ## Writing Wheel Templates
182
-
183
- ### Template Variables
184
-
185
- | Variable | Example | Description |
186
- |----------|---------|-------------|
187
- | `{version}` | `0.4.0` | Package version |
188
- | `{cuda_version}` | `12.8` | Full CUDA version |
189
- | `{cuda_short}` | `128` | CUDA without dot |
190
- | `{cuda_major}` | `12` | CUDA major only |
191
- | `{torch_version}` | `2.8.0` | Full PyTorch version |
192
- | `{torch_mm}` | `28` | PyTorch major.minor no dot |
193
- | `{torch_dotted_mm}` | `2.8` | PyTorch major.minor with dot |
194
- | `{py_version}` | `3.10` | Python version |
195
- | `{py_short}` | `310` | Python without dot |
196
- | `{py_tag}` | `cp310` | Python wheel tag |
197
- | `{platform}` | `linux_x86_64` | Platform tag |
198
-
199
- ### Common Wheel URL Patterns
200
-
201
- **Pattern 1: Simple CUDA + Python**
202
- ```
203
- https://example.com/{package}-{version}+cu{cuda_short}-{py_tag}-{py_tag}-{platform}.whl
204
- ```
205
-
206
- **Pattern 2: CUDA + PyTorch**
207
- ```
208
- https://example.com/{package}-{version}+cu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl
209
- ```
210
-
211
- **Pattern 3: GitHub Releases**
212
- ```
213
- https://github.com/org/repo/releases/download/v{version}/{package}-{version}+cu{cuda_short}-{py_tag}-{platform}.whl
214
- ```
215
-
216
- ### How to Find the Right Template
217
-
218
- 1. Download a wheel manually from the source
219
- 2. Look at the filename pattern: `nvdiffrast-0.4.0+cu128torch28-cp310-cp310-linux_x86_64.whl`
220
- 3. Replace values with variables: `nvdiffrast-{version}+cu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl`
221
- 4. Prepend the base URL
222
-
223
- ### Testing Your Template
224
-
225
- ```bash
226
- comfy-env resolve my-package==1.0.0
227
166
  ```
228
167
 
229
- This shows the resolved URL without installing.
168
+ ## CUDA Wheels Index
230
169
 
231
- ### Adding Custom Wheel Sources
170
+ CUDA packages are installed from the [cuda-wheels](https://pozzettiandrea.github.io/cuda-wheels/) index, which provides pre-built wheels for:
232
171
 
233
- If a package isn't in the built-in registry, add it to your `comfy-env.toml`:
172
+ - **PyTorch Geometric**: torch-scatter, torch-cluster, torch-sparse, torch-spline-conv
173
+ - **NVIDIA**: nvdiffrast, pytorch3d, gsplat
174
+ - **Attention**: flash-attn, sageattention
175
+ - **Mesh Processing**: cumesh, cubvh
176
+ - **Others**: spconv, detectron2, lietorch, and more
234
177
 
235
- ```toml
236
- [cuda]
237
- my-custom-pkg = "1.0.0"
178
+ Wheels are automatically selected based on your GPU, CUDA version, PyTorch version, and Python version.
238
179
 
239
- [wheel_sources]
240
- my-custom-pkg = "https://my-server.com/my-custom-pkg-{version}+cu{cuda_short}-{py_tag}-{platform}.whl"
241
- ```
180
+ ### Supported Configurations
242
181
 
243
- Resolution order:
244
- 1. User's `[wheel_sources]` in comfy-env.toml (highest priority)
245
- 2. Built-in `wheel_sources.yml` registry
246
- 3. Error if not found
182
+ | GPU Architecture | CUDA | PyTorch |
183
+ |-----------------|------|---------|
184
+ | Blackwell (sm_100+) | 12.8 | 2.8+ |
185
+ | Ada/Hopper/Ampere (sm_80+) | 12.8 | 2.8 |
186
+ | Turing (sm_75) | 12.8 | 2.8 |
187
+ | Pascal (sm_60) | 12.4 | 2.4 |
247
188
 
248
189
  ## API Reference
249
190
 
@@ -271,7 +212,7 @@ env = RuntimeEnv.detect()
271
212
  print(env)
272
213
  # Python 3.10, CUDA 12.8, PyTorch 2.8.0, GPU: NVIDIA GeForce RTX 4090
273
214
 
274
- # Get template variables
215
+ # Get environment variables
275
216
  vars_dict = env.as_dict()
276
217
  # {'cuda_version': '12.8', 'cuda_short': '128', 'torch_mm': '28', ...}
277
218
  ```
@@ -316,16 +257,6 @@ print(get_gpu_summary())
316
257
  # GPU 0: NVIDIA GeForce RTX 5090 (sm_120) [Blackwell - CUDA 12.8]
317
258
  ```
318
259
 
319
- ## Built-in Package Registry
320
-
321
- Run `comfy-env list-packages` to see all packages in the built-in registry.
322
-
323
- The registry includes:
324
- - PyTorch Geometric packages (torch-scatter, torch-cluster, torch-sparse)
325
- - NVIDIA packages (nvdiffrast, pytorch3d, gsplat)
326
- - Flash Attention (flash-attn)
327
- - And more
328
-
329
260
  ## License
330
261
 
331
262
  MIT - see LICENSE file.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "comfy-env"
3
- version = "0.0.65"
3
+ version = "0.0.67"
4
4
  description = "Environment management for ComfyUI custom nodes - CUDA wheel resolution and process isolation"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -20,8 +20,8 @@ classifiers = [
20
20
  ]
21
21
  dependencies = [
22
22
  "tomli>=2.0.0; python_version < '3.11'", # TOML parsing (built-in tomllib for 3.11+)
23
+ "tomli-w>=1.0.0", # TOML writing (no stdlib equivalent)
23
24
  "uv>=0.4.0", # Fast Python package installer and venv creator
24
- "pyyaml>=6.0", # YAML parsing for wheel_sources.yml
25
25
  ]
26
26
 
27
27
  [project.optional-dependencies]
@@ -42,9 +42,6 @@ build-backend = "hatchling.build"
42
42
  [tool.hatch.build.targets.wheel]
43
43
  packages = ["src/comfy_env"]
44
44
 
45
- [tool.hatch.build.targets.wheel.force-include]
46
- "src/comfy_env/wheel_sources.yml" = "comfy_env/wheel_sources.yml"
47
-
48
45
  [tool.ruff]
49
46
  line-length = 100
50
47
  target-version = "py310"
@@ -0,0 +1,108 @@
1
+ """
2
+ comfy-env: Environment management for ComfyUI custom nodes.
3
+
4
+ All dependencies go through pixi for unified management.
5
+
6
+ Main APIs:
7
+ - install(): Install dependencies from comfy-env.toml
8
+ - wrap_isolated_nodes(): Wrap nodes for subprocess isolation
9
+ """
10
+
11
+ from importlib.metadata import version, PackageNotFoundError
12
+
13
+ try:
14
+ __version__ = version("comfy-env")
15
+ except PackageNotFoundError:
16
+ __version__ = "0.0.0-dev"
17
+
18
+ # Config types and parsing
19
+ from .config import (
20
+ ComfyEnvConfig,
21
+ NodeReq,
22
+ load_config,
23
+ discover_config,
24
+ CONFIG_FILE_NAME,
25
+ )
26
+
27
+ # Pixi integration
28
+ from .pixi import (
29
+ ensure_pixi,
30
+ get_pixi_path,
31
+ get_pixi_python,
32
+ pixi_run,
33
+ pixi_install,
34
+ CUDA_WHEELS_INDEX,
35
+ detect_cuda_version,
36
+ detect_cuda_environment,
37
+ get_recommended_cuda_version,
38
+ GPUInfo,
39
+ CUDAEnvironment,
40
+ )
41
+
42
+ # Workers
43
+ from .workers import (
44
+ Worker,
45
+ WorkerError,
46
+ MPWorker,
47
+ SubprocessWorker,
48
+ )
49
+
50
+ # Isolation
51
+ from .isolation import wrap_isolated_nodes
52
+
53
+ # Install API
54
+ from .install import install, verify_installation
55
+
56
+ # Prestartup helpers
57
+ from .prestartup import setup_env
58
+
59
+ # Errors
60
+ from .errors import (
61
+ EnvManagerError,
62
+ ConfigError,
63
+ WheelNotFoundError,
64
+ DependencyError,
65
+ CUDANotFoundError,
66
+ InstallError,
67
+ )
68
+
69
+ __all__ = [
70
+ # Install API
71
+ "install",
72
+ "verify_installation",
73
+ # Prestartup
74
+ "setup_env",
75
+ # Isolation
76
+ "wrap_isolated_nodes",
77
+ # Config
78
+ "ComfyEnvConfig",
79
+ "NodeReq",
80
+ "load_config",
81
+ "discover_config",
82
+ "CONFIG_FILE_NAME",
83
+ # Pixi
84
+ "ensure_pixi",
85
+ "get_pixi_path",
86
+ "get_pixi_python",
87
+ "pixi_run",
88
+ "pixi_install",
89
+ "CUDA_WHEELS_INDEX",
90
+ # CUDA detection
91
+ "detect_cuda_version",
92
+ "detect_cuda_environment",
93
+ "get_recommended_cuda_version",
94
+ "GPUInfo",
95
+ "CUDAEnvironment",
96
+ # Workers
97
+ "Worker",
98
+ "WorkerError",
99
+ "MPWorker",
100
+ "SubprocessWorker",
101
+ # Errors
102
+ "EnvManagerError",
103
+ "ConfigError",
104
+ "WheelNotFoundError",
105
+ "DependencyError",
106
+ "CUDANotFoundError",
107
+ "InstallError",
108
+ ]