comfy-env 0.0.42__tar.gz → 0.0.44__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 (45) hide show
  1. {comfy_env-0.0.42 → comfy_env-0.0.44}/PKG-INFO +1 -1
  2. {comfy_env-0.0.42 → comfy_env-0.0.44}/pyproject.toml +1 -1
  3. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/manager.py +27 -8
  4. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/install.py +32 -5
  5. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/wheel_sources.yml +39 -22
  6. {comfy_env-0.0.42 → comfy_env-0.0.44}/.github/workflows/publish.yml +0 -0
  7. {comfy_env-0.0.42 → comfy_env-0.0.44}/.gitignore +0 -0
  8. {comfy_env-0.0.42 → comfy_env-0.0.44}/LICENSE +0 -0
  9. {comfy_env-0.0.42 → comfy_env-0.0.44}/README.md +0 -0
  10. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/__init__.py +0 -0
  11. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/cli.py +0 -0
  12. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/decorator.py +0 -0
  13. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/__init__.py +0 -0
  14. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/config.py +0 -0
  15. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/config_file.py +0 -0
  16. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/cuda_gpu_detection.py +0 -0
  17. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/platform/__init__.py +0 -0
  18. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/platform/base.py +0 -0
  19. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/platform/darwin.py +0 -0
  20. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/platform/linux.py +0 -0
  21. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/platform/windows.py +0 -0
  22. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/env/security.py +0 -0
  23. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/errors.py +0 -0
  24. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/ipc/__init__.py +0 -0
  25. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/ipc/bridge.py +0 -0
  26. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/ipc/protocol.py +0 -0
  27. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/ipc/tensor.py +0 -0
  28. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/ipc/torch_bridge.py +0 -0
  29. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/ipc/transport.py +0 -0
  30. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/ipc/worker.py +0 -0
  31. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/nodes.py +0 -0
  32. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/pixi.py +0 -0
  33. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/registry.py +0 -0
  34. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/resolver.py +0 -0
  35. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/stubs/__init__.py +0 -0
  36. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/stubs/comfy/__init__.py +0 -0
  37. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/stubs/comfy/model_management.py +0 -0
  38. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/stubs/comfy/utils.py +0 -0
  39. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/stubs/folder_paths.py +0 -0
  40. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/workers/__init__.py +0 -0
  41. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/workers/base.py +0 -0
  42. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/workers/pool.py +0 -0
  43. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/workers/tensor_utils.py +0 -0
  44. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/workers/torch_mp.py +0 -0
  45. {comfy_env-0.0.42 → comfy_env-0.0.44}/src/comfy_env/workers/venv.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.42
3
+ Version: 0.0.44
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "comfy-env"
3
- version = "0.0.42"
3
+ version = "0.0.44"
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"}
@@ -383,13 +383,19 @@ class IsolatedEnvManager:
383
383
 
384
384
  if "wheel_template" in config:
385
385
  # Direct wheel URL from template
386
- effective_version = version or config.get("default_version")
387
- if not effective_version:
388
- raise RuntimeError(f"Package {package} requires version (no default in registry)")
389
-
390
- vars_dict["version"] = effective_version
391
- wheel_url = self._substitute_template(config["wheel_template"], vars_dict)
392
- self.log(f" Installing {package}=={effective_version}...")
386
+ template = config["wheel_template"]
387
+
388
+ # Only require version if template uses {version}
389
+ effective_version = None
390
+ if "{version}" in template:
391
+ effective_version = version or config.get("default_version")
392
+ if not effective_version:
393
+ raise RuntimeError(f"Package {package} requires version (no default in registry)")
394
+ vars_dict["version"] = effective_version
395
+
396
+ wheel_url = self._substitute_template(template, vars_dict)
397
+ version_str = f"=={effective_version}" if effective_version else ""
398
+ self.log(f" Installing {package}{version_str}...")
393
399
  self.log(f" URL: {wheel_url}")
394
400
  result = subprocess.run(
395
401
  pip_args + ["--no-deps", wheel_url],
@@ -398,6 +404,19 @@ class IsolatedEnvManager:
398
404
  if result.returncode != 0:
399
405
  raise RuntimeError(f"Failed to install {package}: {result.stderr}")
400
406
 
407
+ elif "find_links" in config:
408
+ # find_links: pip resolves wheel from index URL
409
+ find_links_url = config["find_links"]
410
+ effective_version = version or config.get("default_version")
411
+ pkg_spec = f"{package}=={effective_version}" if effective_version else package
412
+ self.log(f" Installing {pkg_spec} from {find_links_url}...")
413
+ result = subprocess.run(
414
+ pip_args + ["--no-deps", "--find-links", find_links_url, pkg_spec],
415
+ capture_output=True, text=True,
416
+ )
417
+ if result.returncode != 0:
418
+ raise RuntimeError(f"Failed to install {package}: {result.stderr}")
419
+
401
420
  elif "package_name" in config:
402
421
  # PyPI variant (e.g., spconv-cu124)
403
422
  pkg_name = self._substitute_template(config["package_name"], vars_dict)
@@ -411,7 +430,7 @@ class IsolatedEnvManager:
411
430
  raise RuntimeError(f"Failed to install {package}: {result.stderr}")
412
431
 
413
432
  else:
414
- raise RuntimeError(f"Package {package} in registry but missing wheel_template or package_name")
433
+ raise RuntimeError(f"Package {package} in registry but missing wheel_template, find_links, or package_name")
415
434
 
416
435
  else:
417
436
  # Not in registry - error
@@ -310,7 +310,7 @@ def _install_local(
310
310
 
311
311
  cuda_packages = []
312
312
  for pkg, ver in local_config.cuda_packages.items():
313
- if ver:
313
+ if ver and ver != "*":
314
314
  cuda_packages.append(f"{pkg}=={ver}")
315
315
  else:
316
316
  cuda_packages.append(pkg)
@@ -367,11 +367,25 @@ def _resolve_wheel_url(
367
367
 
368
368
  # wheel_template: direct URL
369
369
  if "wheel_template" in config:
370
+ template = config["wheel_template"]
371
+
372
+ # Only require version if template uses {version}
373
+ if "{version}" in template:
374
+ effective_version = version or config.get("default_version")
375
+ if not effective_version:
376
+ raise InstallError(f"Package {package} requires version (no default in registry)")
377
+ vars_dict["version"] = effective_version
378
+
379
+ return _substitute_template(template, vars_dict)
380
+
381
+ # find_links: pip resolves wheel from index (e.g., miropsota's detectron2)
382
+ if "find_links" in config:
383
+ find_links_url = config["find_links"]
370
384
  effective_version = version or config.get("default_version")
371
- if not effective_version:
372
- raise InstallError(f"Package {package} requires version (no default in registry)")
373
- vars_dict["version"] = effective_version
374
- return _substitute_template(config["wheel_template"], vars_dict)
385
+ if effective_version:
386
+ return f"find_links:{find_links_url}:{package}=={effective_version}"
387
+ else:
388
+ return f"find_links:{find_links_url}:{package}"
375
389
 
376
390
  # package_name: PyPI variant (e.g., spconv-cu124)
377
391
  if "package_name" in config:
@@ -406,6 +420,11 @@ def _install_cuda_package(
406
420
  pkg_spec = f"{pkg_name}=={version}" if version else pkg_name
407
421
  log(f" Installing {package} as {pkg_spec} from PyPI...")
408
422
  _pip_install([pkg_spec], no_deps=False, log=log)
423
+ elif url_or_marker.startswith("find_links:"):
424
+ # find_links: pip resolves from index URL
425
+ _, find_links_url, pkg_spec = url_or_marker.split(":", 2)
426
+ log(f" Installing {pkg_spec} from {find_links_url}...")
427
+ _pip_install([pkg_spec, "--find-links", find_links_url], no_deps=True, log=log)
409
428
  else:
410
429
  # Direct wheel URL
411
430
  log(f" Installing {package}...")
@@ -445,6 +464,9 @@ def _pip_install(
445
464
  pip_cmd = _get_pip_command()
446
465
 
447
466
  args = pip_cmd + ["install"]
467
+ # uv requires --system when not in a venv (CI environments)
468
+ if _is_using_uv():
469
+ args.append("--system")
448
470
  if no_deps:
449
471
  args.append("--no-deps")
450
472
  args.extend(packages)
@@ -469,6 +491,11 @@ def _get_pip_command() -> List[str]:
469
491
  return [sys.executable, "-m", "pip"]
470
492
 
471
493
 
494
+ def _is_using_uv() -> bool:
495
+ """Check if we're using uv for pip commands."""
496
+ return shutil.which("uv") is not None
497
+
498
+
472
499
  def verify_installation(
473
500
  packages: List[str],
474
501
  log: Callable[[str], None] = print,
@@ -25,85 +25,101 @@ packages:
25
25
  # ===========================================================================
26
26
  torch-scatter:
27
27
  wheel_template: "https://data.pyg.org/whl/torch-{torch_version}%2Bcu{cuda_short}/torch_scatter-{version}%2Bpt{torch_mm}cu{cuda_short}-{py_tag}-{py_tag}-{platform}.whl"
28
+ default_version: "2.1.2"
28
29
  description: Scatter operations for PyTorch
29
30
 
30
31
  torch-cluster:
31
32
  wheel_template: "https://data.pyg.org/whl/torch-{torch_version}%2Bcu{cuda_short}/torch_cluster-{version}%2Bpt{torch_mm}cu{cuda_short}-{py_tag}-{py_tag}-{platform}.whl"
33
+ default_version: "1.6.3"
32
34
  description: Clustering algorithms for PyTorch
33
35
 
34
36
  torch-sparse:
35
37
  wheel_template: "https://data.pyg.org/whl/torch-{torch_version}%2Bcu{cuda_short}/torch_sparse-{version}%2Bpt{torch_mm}cu{cuda_short}-{py_tag}-{py_tag}-{platform}.whl"
38
+ default_version: "0.6.18"
36
39
  description: Sparse tensor operations for PyTorch
37
40
 
38
41
  torch-spline-conv:
39
42
  wheel_template: "https://data.pyg.org/whl/torch-{torch_version}%2Bcu{cuda_short}/torch_spline_conv-{version}%2Bpt{torch_mm}cu{cuda_short}-{py_tag}-{py_tag}-{platform}.whl"
43
+ default_version: "1.2.2"
40
44
  description: Spline convolutions for PyTorch
41
45
 
42
46
  # ===========================================================================
43
- # PozzettiAndrea cuda-wheels (unified PEP 503 index)
44
- # https://pozzettiandrea.github.io/cuda-wheels
47
+ # PozzettiAndrea cuda-wheels (GitHub releases)
48
+ # https://github.com/PozzettiAndrea/cuda-wheels/releases
45
49
  # ===========================================================================
46
50
  pytorch3d:
47
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/pytorch3d/pytorch3d-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
51
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/pytorch3d-latest/pytorch3d-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
48
52
  default_version: "0.7.9"
49
53
  description: PyTorch3D - 3D deep learning library
50
54
 
51
55
  nvdiffrast:
52
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/nvdiffrast/nvdiffrast-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
56
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/nvdiffrast-latest/nvdiffrast-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
57
+ default_version: "0.4.0"
53
58
  description: NVIDIA differentiable rasterizer
54
59
 
55
60
  cumesh:
56
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/cumesh/cumesh-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
61
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/cumesh-latest/cumesh-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
62
+ default_version: "0.0.1"
57
63
  description: CUDA-accelerated mesh utilities
58
64
 
59
65
  cubvh:
60
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/cubvh/cubvh-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
66
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/cubvh-latest/cubvh-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
67
+ default_version: "0.1.2"
61
68
  description: CUDA BVH acceleration for mesh operations and marching cubes
62
69
 
63
70
  o_voxel:
64
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/o-voxel/o_voxel-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
71
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/o_voxel-latest/o_voxel-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
72
+ default_version: "0.0.1"
65
73
  description: O-Voxel CUDA extension for TRELLIS
66
74
 
67
75
  flex_gemm:
68
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/flex-gemm/flex_gemm-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
76
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/flex_gemm-latest/flex_gemm-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
77
+ default_version: "1.0.0"
69
78
  description: Flexible GEMM operations
70
79
 
71
80
  nvdiffrec_render:
72
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/nvdiffrec-render/nvdiffrec_render-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
81
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/nvdiffrec_render-latest/nvdiffrec_render-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
82
+ default_version: "0.0.1"
73
83
  description: NVDiffRec rendering utilities
74
84
 
75
85
  gsplat:
76
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/gsplat/gsplat-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
86
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/gsplat-latest/gsplat-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
87
+ default_version: "1.5.3"
77
88
  description: Gaussian splatting rasterization
78
89
 
79
90
  cc_torch:
80
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/cc-torch/cc_torch-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
91
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/cc_torch-latest/cc_torch-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
92
+ default_version: "0.2"
81
93
  description: GPU-accelerated connected components
82
94
 
83
95
  torch_generic_nms:
84
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/torch-generic-nms/torch_generic_nms-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
96
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/torch_generic_nms-latest/torch_generic_nms-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
97
+ default_version: "0.1"
85
98
  description: GPU-accelerated Non-Maximum Suppression
86
99
 
87
100
  lietorch:
88
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/lietorch/lietorch-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
101
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/lietorch-latest/lietorch-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
102
+ default_version: "0.3"
89
103
  description: Lie group operations for PyTorch (DPVO dependency)
90
104
 
91
- dpvo-cuda:
92
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/dpvo_cuda/dpvo_cuda-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
93
- default_version: "1.0.0"
94
- description: DPVO CUDA extensions (cuda_corr, cuda_ba, lietorch_backends)
95
-
96
105
  sageattention:
97
- wheel_template: "https://pozzettiandrea.github.io/cuda-wheels/sageattention/sageattention-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
106
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/sageattention-latest/sageattention-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
107
+ default_version: "2.2.0"
98
108
  description: SageAttention - 2-5x faster than FlashAttention with quantized kernels
99
109
 
110
+ dpvo_cuda:
111
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/dpvo_cuda-latest/dpvo_cuda-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
112
+ default_version: "0.0.0"
113
+ description: DPVO CUDA extensions (cuda_corr, cuda_ba, lietorch_backends) - torch 2.4 only
114
+
100
115
  # ===========================================================================
101
116
  # detectron2 - Facebook's detection library
102
117
  # https://github.com/facebookresearch/detectron2
103
118
  # Prebuilt wheels from miropsota's torch_packages_builder
104
119
  # ===========================================================================
105
120
  detectron2:
106
- wheel_template: "https://miropsota.github.io/torch_packages_builder/detectron2/detectron2-0.6%2B2a420edpt{torch_version}cu{cuda_short}-{py_tag}-{py_tag}-{platform}.whl"
121
+ find_links: "https://miropsota.github.io/torch_packages_builder/detectron2/"
122
+ default_version: "0.6"
107
123
  description: Detectron2 - Facebook's detection and segmentation library
108
124
 
109
125
  # ===========================================================================
@@ -120,5 +136,6 @@ packages:
120
136
  # Note: This uses a special package_name field, not wheel_template
121
137
  # ===========================================================================
122
138
  spconv:
123
- package_name: "spconv-cu{cuda_short2}"
124
- description: Sparse convolution library (installs spconv-cu124, spconv-cu126, etc.)
139
+ wheel_template: "https://github.com/PozzettiAndrea/cuda-wheels/releases/download/spconv_cu{cuda_short}-latest/spconv-{version}%2Bcu{cuda_short}torch{torch_mm}-{py_tag}-{py_tag}-{platform}.whl"
140
+ default_version: "2.3.8"
141
+ description: Sparse convolution library
File without changes
File without changes
File without changes