comfy-env 0.0.65__py3-none-any.whl → 0.0.67__py3-none-any.whl

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 (55) hide show
  1. comfy_env/__init__.py +68 -122
  2. comfy_env/cli.py +74 -204
  3. comfy_env/config/__init__.py +19 -0
  4. comfy_env/config/parser.py +151 -0
  5. comfy_env/config/types.py +64 -0
  6. comfy_env/install.py +83 -361
  7. comfy_env/isolation/__init__.py +9 -0
  8. comfy_env/isolation/wrap.py +351 -0
  9. comfy_env/nodes.py +2 -2
  10. comfy_env/pixi/__init__.py +48 -0
  11. comfy_env/pixi/core.py +356 -0
  12. comfy_env/{resolver.py → pixi/resolver.py} +1 -14
  13. comfy_env/prestartup.py +60 -0
  14. comfy_env/templates/comfy-env-instructions.txt +30 -87
  15. comfy_env/templates/comfy-env.toml +69 -128
  16. comfy_env/workers/__init__.py +21 -32
  17. comfy_env/workers/base.py +1 -1
  18. comfy_env/workers/{torch_mp.py → mp.py} +47 -14
  19. comfy_env/workers/{venv.py → subprocess.py} +397 -443
  20. {comfy_env-0.0.65.dist-info → comfy_env-0.0.67.dist-info}/METADATA +23 -92
  21. comfy_env-0.0.67.dist-info/RECORD +32 -0
  22. comfy_env/decorator.py +0 -700
  23. comfy_env/env/__init__.py +0 -46
  24. comfy_env/env/config.py +0 -191
  25. comfy_env/env/config_file.py +0 -706
  26. comfy_env/env/manager.py +0 -636
  27. comfy_env/env/security.py +0 -267
  28. comfy_env/ipc/__init__.py +0 -55
  29. comfy_env/ipc/bridge.py +0 -476
  30. comfy_env/ipc/protocol.py +0 -265
  31. comfy_env/ipc/tensor.py +0 -371
  32. comfy_env/ipc/torch_bridge.py +0 -401
  33. comfy_env/ipc/transport.py +0 -318
  34. comfy_env/ipc/worker.py +0 -221
  35. comfy_env/isolation.py +0 -310
  36. comfy_env/pixi.py +0 -760
  37. comfy_env/registry.py +0 -130
  38. comfy_env/stub_imports.py +0 -270
  39. comfy_env/stubs/__init__.py +0 -1
  40. comfy_env/stubs/comfy/__init__.py +0 -6
  41. comfy_env/stubs/comfy/model_management.py +0 -58
  42. comfy_env/stubs/comfy/utils.py +0 -29
  43. comfy_env/stubs/folder_paths.py +0 -71
  44. comfy_env/wheel_sources.yml +0 -141
  45. comfy_env/workers/pool.py +0 -241
  46. comfy_env-0.0.65.dist-info/RECORD +0 -48
  47. /comfy_env/{env/cuda_gpu_detection.py → pixi/cuda_detection.py} +0 -0
  48. /comfy_env/{env → pixi}/platform/__init__.py +0 -0
  49. /comfy_env/{env → pixi}/platform/base.py +0 -0
  50. /comfy_env/{env → pixi}/platform/darwin.py +0 -0
  51. /comfy_env/{env → pixi}/platform/linux.py +0 -0
  52. /comfy_env/{env → pixi}/platform/windows.py +0 -0
  53. {comfy_env-0.0.65.dist-info → comfy_env-0.0.67.dist-info}/WHEEL +0 -0
  54. {comfy_env-0.0.65.dist-info → comfy_env-0.0.67.dist-info}/entry_points.txt +0 -0
  55. {comfy_env-0.0.65.dist-info → comfy_env-0.0.67.dist-info}/licenses/LICENSE +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.
@@ -0,0 +1,32 @@
1
+ comfy_env/__init__.py,sha256=s0RkyKsBlDiSI4ZSwivtWLvYhc8DS0CUEWgFLVJbtLA,2176
2
+ comfy_env/cli.py,sha256=ky7jC8eArKbjgYw9Uy52MKajmtLb16wYblrbEOoiy2U,9599
3
+ comfy_env/errors.py,sha256=q-C3vyrPa_kk_Ao8l17mIGfJiG2IR0hCFV0GFcNLmcI,9924
4
+ comfy_env/install.py,sha256=BO8qbrXKOmNnjjabnYouRUn7vecGxE5Z136Vl0eHNGs,5120
5
+ comfy_env/nodes.py,sha256=nBkG2pESeOt5kXSgTDIHAHaVdHK8-rEueR3BxXWn6TE,4354
6
+ comfy_env/prestartup.py,sha256=_b9QIWsHzkQD5VYdiyn0beHMLoWx18aC4RKB8SlJiGE,2048
7
+ comfy_env/config/__init__.py,sha256=4Guylkb-FV8QxhFwschzpzbr2eu8y-KNgNT3_JOm9jc,403
8
+ comfy_env/config/parser.py,sha256=l1RncyvyvO_ySeiKO13knpfqI5Fb1ShCNQEQQ2lW23g,3933
9
+ comfy_env/config/types.py,sha256=H0m_L4nURv-9M-JZvTcyG9VEcbWzBlppA3Xin26B0jM,1883
10
+ comfy_env/isolation/__init__.py,sha256=vw9a4mpJ2CFjy-PLe_A3zQ6umBQklgqWNxwn9beNw3g,175
11
+ comfy_env/isolation/wrap.py,sha256=9bXxK9h4FMrFL9k4EAdILWxkjXYytVCJV68MuwwufK8,11485
12
+ comfy_env/pixi/__init__.py,sha256=BUrq7AQf3WDm0cHWh72B2xZbURNnDu2dCuELWiQCUiM,997
13
+ comfy_env/pixi/core.py,sha256=iYTvCxmf2M9fxK9cM9RyKQyOSJVkpHyR7GXPm45ZFRI,12656
14
+ comfy_env/pixi/cuda_detection.py,sha256=sqB3LjvGNdV4eFqiARQGfyecBM3ZiUmeh6nG0YCRYQw,9751
15
+ comfy_env/pixi/resolver.py,sha256=U_A8rBDxCj4gUlJt2YJQniP4cCKqxJEiVFgXOoH7vM8,6339
16
+ comfy_env/pixi/platform/__init__.py,sha256=Nb5MPZIEeanSMEWwqU4p4bnEKTJn1tWcwobnhq9x9IY,614
17
+ comfy_env/pixi/platform/base.py,sha256=iS0ptTTVjXRwPU4qWUdvHI7jteuzxGSjWr5BUQ7hGiU,2453
18
+ comfy_env/pixi/platform/darwin.py,sha256=HK3VkLT6DfesAnIXwx2IaUFHTBclF0xTQnC7azWY6Kc,1552
19
+ comfy_env/pixi/platform/linux.py,sha256=xLp8FEbFqZLQrzIZBI9z3C4g23Ab1ASTHLsXDzsdCoA,2062
20
+ comfy_env/pixi/platform/windows.py,sha256=FCOCgpzGzorY9-HueMlJUR8DxM2eH-cj9iZk6K026Is,10891
21
+ comfy_env/templates/comfy-env-instructions.txt,sha256=ve1RAthW7ouumU9h6DM7mIRX1MS8_Tyonq2U4tcrFu8,1031
22
+ comfy_env/templates/comfy-env.toml,sha256=TBa_8V8gdwoRej4Lb_mkqZ_Ytk_quFTnbwwc1YK_gHE,4190
23
+ comfy_env/workers/__init__.py,sha256=TMVG55d2XLP1mJ3x1d16H0SBDJZtk2kMC5P4HLk9TrA,1073
24
+ comfy_env/workers/base.py,sha256=4ZYTaQ4J0kBHCoO_OfZnsowm4rJCoqinZUaOtgkOPbw,2307
25
+ comfy_env/workers/mp.py,sha256=E_SUvvCd11uCW5dIURET8EVHcgRtu36MPOEjCFDq4Ok,23920
26
+ comfy_env/workers/subprocess.py,sha256=UMhKhaJoSjv2-FWnwQq9TeMWtaDLIs3ajAFTq1ngdJw,57844
27
+ comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaFLLq8,6409
28
+ comfy_env-0.0.67.dist-info/METADATA,sha256=J0u--ky-c7j_vt0j8vu2F3tqZrYS8mi_wTqXjMJkx1M,6946
29
+ comfy_env-0.0.67.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
30
+ comfy_env-0.0.67.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
31
+ comfy_env-0.0.67.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
32
+ comfy_env-0.0.67.dist-info/RECORD,,