comfy-env 0.0.32__py3-none-any.whl → 0.0.34__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.
comfy_env/env/manager.py CHANGED
@@ -386,20 +386,26 @@ class IsolatedEnvManager:
386
386
  self.log(f" Installing {package} ({method})...")
387
387
 
388
388
  if method == "index":
389
- # PEP 503 index - use --extra-index-url
389
+ # PEP 503 index - try to resolve exact wheel URL first
390
390
  index_url = self._substitute_template(config["index_url"], vars_dict)
391
391
  pkg_spec = f"{package}=={version}" if version else package
392
392
  # Try to resolve exact wheel URL from index
393
393
  wheel_url = resolve_wheel_from_index(index_url, package, vars_dict, version)
394
394
  if wheel_url:
395
+ # Install from resolved URL directly (guarantees we get what we resolved)
395
396
  self.log(f" Wheel: {wheel_url}")
397
+ result = subprocess.run(
398
+ pip_args + ["--no-deps", wheel_url],
399
+ capture_output=True, text=True,
400
+ )
396
401
  else:
402
+ # Fallback to index-based resolution
397
403
  self.log(f" Index: {index_url}")
398
404
  self.log(f" Package: {pkg_spec}")
399
- result = subprocess.run(
400
- pip_args + ["--extra-index-url", index_url, "--no-deps", pkg_spec],
401
- capture_output=True, text=True,
402
- )
405
+ result = subprocess.run(
406
+ pip_args + ["--extra-index-url", index_url, "--no-deps", pkg_spec],
407
+ capture_output=True, text=True,
408
+ )
403
409
 
404
410
  elif method in ("github_index", "find_links"):
405
411
  # GitHub Pages or generic find-links
@@ -408,14 +414,20 @@ class IsolatedEnvManager:
408
414
  # Try to resolve exact wheel URL from find-links page
409
415
  wheel_url = resolve_wheel_from_index(index_url, package, vars_dict, version)
410
416
  if wheel_url:
417
+ # Install from resolved URL directly (guarantees we get what we resolved)
411
418
  self.log(f" Wheel: {wheel_url}")
419
+ result = subprocess.run(
420
+ pip_args + ["--no-deps", wheel_url],
421
+ capture_output=True, text=True,
422
+ )
412
423
  else:
424
+ # Fallback to find-links based resolution
413
425
  self.log(f" Find-links: {index_url}")
414
426
  self.log(f" Package: {pkg_spec}")
415
- result = subprocess.run(
416
- pip_args + ["--find-links", index_url, "--no-deps", pkg_spec],
417
- capture_output=True, text=True,
418
- )
427
+ result = subprocess.run(
428
+ pip_args + ["--find-links", index_url, "--no-deps", pkg_spec],
429
+ capture_output=True, text=True,
430
+ )
419
431
 
420
432
  elif method == "pypi_variant":
421
433
  # Transform package name based on CUDA version
comfy_env/install.py CHANGED
@@ -475,7 +475,7 @@ def _install_cuda_package(
475
475
  method = config["method"]
476
476
 
477
477
  if method == "index":
478
- # PEP 503 index - use pip --extra-index-url
478
+ # PEP 503 index - try to resolve exact wheel URL first
479
479
  index_url = _substitute_template(config["index_url"], env)
480
480
  # Check for version_template (e.g., detectron2 with embedded torch/cuda version)
481
481
  if "version_template" in config:
@@ -489,14 +489,17 @@ def _install_cuda_package(
489
489
  vars_dict = env.as_dict()
490
490
  wheel_url = resolve_wheel_from_index(index_url, package, vars_dict, actual_version)
491
491
  if wheel_url:
492
+ # Install from resolved URL directly (guarantees we get what we resolved)
492
493
  log(f" Wheel: {wheel_url}")
494
+ _pip_install([wheel_url], no_deps=True, log=log)
493
495
  else:
496
+ # Fallback to index-based resolution
494
497
  log(f" Index: {index_url}")
495
498
  log(f" Package: {pkg_spec}")
496
- _pip_install_with_index(pkg_spec, index_url, log)
499
+ _pip_install_with_index(pkg_spec, index_url, log)
497
500
 
498
501
  elif method == "github_index":
499
- # GitHub Pages index - use pip --find-links
502
+ # GitHub Pages index - try to resolve exact wheel URL first
500
503
  index_url = _substitute_template(config["index_url"], env)
501
504
  pkg_spec = f"{package}=={version}" if version else package
502
505
  log(f" Installing {package} (github_index)...")
@@ -504,14 +507,17 @@ def _install_cuda_package(
504
507
  vars_dict = env.as_dict()
505
508
  wheel_url = resolve_wheel_from_index(index_url, package, vars_dict, version)
506
509
  if wheel_url:
510
+ # Install from resolved URL directly (guarantees we get what we resolved)
507
511
  log(f" Wheel: {wheel_url}")
512
+ _pip_install([wheel_url], no_deps=True, log=log)
508
513
  else:
514
+ # Fallback to find-links based resolution
509
515
  log(f" Find-links: {index_url}")
510
516
  log(f" Package: {pkg_spec}")
511
- _pip_install_with_find_links(pkg_spec, index_url, log)
517
+ _pip_install_with_find_links(pkg_spec, index_url, log)
512
518
 
513
519
  elif method == "find_links":
514
- # Generic find-links (e.g., PyG) - use pip --find-links
520
+ # Generic find-links (e.g., PyG) - try to resolve exact wheel URL first
515
521
  index_url = _substitute_template(config["index_url"], env)
516
522
  pkg_spec = f"{package}=={version}" if version else package
517
523
  log(f" Installing {package} (find_links)...")
@@ -519,11 +525,14 @@ def _install_cuda_package(
519
525
  vars_dict = env.as_dict()
520
526
  wheel_url = resolve_wheel_from_index(index_url, package, vars_dict, version)
521
527
  if wheel_url:
528
+ # Install from resolved URL directly (guarantees we get what we resolved)
522
529
  log(f" Wheel: {wheel_url}")
530
+ _pip_install([wheel_url], no_deps=True, log=log)
523
531
  else:
532
+ # Fallback to find-links based resolution
524
533
  log(f" Find-links: {index_url}")
525
534
  log(f" Package: {pkg_spec}")
526
- _pip_install_with_find_links(pkg_spec, index_url, log)
535
+ _pip_install_with_find_links(pkg_spec, index_url, log)
527
536
 
528
537
  elif method == "pypi_variant":
529
538
  # Transform package name based on CUDA version
comfy_env/pixi.py CHANGED
@@ -276,6 +276,7 @@ def create_pixi_toml(
276
276
 
277
277
  def clean_pixi_artifacts(
278
278
  node_dir: Path,
279
+ env_name: Optional[str] = None,
279
280
  log: Callable[[str], None] = print,
280
281
  ) -> None:
281
282
  """
@@ -286,6 +287,7 @@ def clean_pixi_artifacts(
286
287
 
287
288
  Args:
288
289
  node_dir: Directory containing the pixi artifacts.
290
+ env_name: Environment name (for removing _env_ symlink).
289
291
  log: Logging callback.
290
292
  """
291
293
  pixi_toml = node_dir / "pixi.toml"
@@ -302,6 +304,13 @@ def clean_pixi_artifacts(
302
304
  shutil.rmtree(pixi_dir)
303
305
  log(" Removed previous .pixi/ directory")
304
306
 
307
+ # Remove _env_ symlink if it exists
308
+ if env_name:
309
+ symlink_path = node_dir / f"_env_{env_name}"
310
+ if symlink_path.is_symlink():
311
+ symlink_path.unlink()
312
+ log(f" Removed previous _env_{env_name} symlink")
313
+
305
314
 
306
315
  def pixi_install(
307
316
  env_config: IsolatedEnv,
@@ -344,7 +353,7 @@ def pixi_install(
344
353
  return True
345
354
 
346
355
  # Clean previous pixi artifacts
347
- clean_pixi_artifacts(node_dir, log)
356
+ clean_pixi_artifacts(node_dir, env_config.name, log)
348
357
 
349
358
  # Ensure pixi is installed
350
359
  pixi_path = ensure_pixi(log=log)
@@ -373,6 +382,22 @@ def pixi_install(
373
382
  log(f" {line}")
374
383
 
375
384
  log("pixi install completed successfully!")
385
+
386
+ # Create _env_{name} symlink for compatibility with uv backend
387
+ # This ensures code that expects _env_envname/bin/python works with pixi
388
+ symlink_path = node_dir / f"_env_{env_config.name}"
389
+ pixi_env_path = node_dir / ".pixi" / "envs" / "default"
390
+
391
+ if pixi_env_path.exists():
392
+ # Remove existing symlink or directory if present
393
+ if symlink_path.is_symlink():
394
+ symlink_path.unlink()
395
+ elif symlink_path.exists():
396
+ shutil.rmtree(symlink_path)
397
+
398
+ symlink_path.symlink_to(pixi_env_path)
399
+ log(f"Created symlink: _env_{env_config.name} -> .pixi/envs/default")
400
+
376
401
  return True
377
402
 
378
403
 
@@ -49,12 +49,12 @@ packages:
49
49
  description: Spline convolutions for PyTorch
50
50
 
51
51
  # ===========================================================================
52
- # pytorch3d - Facebook's official wheels
53
- # https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md
52
+ # pytorch3d - MiroPsota's torch_packages_builder
53
+ # https://github.com/MiroPsota/torch_packages_builder
54
54
  # ===========================================================================
55
55
  pytorch3d:
56
56
  method: index
57
- index_url: "https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py3{py_minor}_cu{cuda_short}_pyt{torch_short}/download.html"
57
+ index_url: "https://miropsota.github.io/torch_packages_builder/pytorch3d/"
58
58
  description: PyTorch3D - 3D deep learning library
59
59
 
60
60
  # ===========================================================================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.32
3
+ Version: 0.0.34
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
@@ -3,16 +3,16 @@ comfy_env/cli.py,sha256=X-GCQMP0mtMcE3ZgkT-VLQ4Gq3UUvcb_Ux_NClEFhgI,15975
3
3
  comfy_env/decorator.py,sha256=6JCKwLHaZtOLVDexs_gh_-NtS2ZK0V7nGCPqkyeYEAA,16688
4
4
  comfy_env/errors.py,sha256=8hN8NDlo8oBUdapc-eT3ZluigI5VBzfqsSBvQdfWlz4,9943
5
5
  comfy_env/index_resolver.py,sha256=D8BttTJ7BOiukUvmdT6_dGdzFV3CahGL2m28X-HwPeE,4650
6
- comfy_env/install.py,sha256=zVrpo6bzWw2gSYTAzjp-6Ne75swLfOr-mhpROe6PhJY,29748
6
+ comfy_env/install.py,sha256=eS3Q8T9bFP4AH2PfqLmjqWA8cu8vJsg02aXBTP5x1IQ,30446
7
7
  comfy_env/nodes.py,sha256=CWUe35jU5SKk4ur-SddZePdqWgxJDlxGhpcJiu5pAK4,4354
8
- comfy_env/pixi.py,sha256=_p3h9iFPHwNaEAEL8SeMJLaUmoyrroH4HJcbfG1Nh8A,13383
8
+ comfy_env/pixi.py,sha256=y25mUDhB3bCqhPMGF0h23Tf8ZHykK4gLJrkvOhsPWmE,14398
9
9
  comfy_env/registry.py,sha256=uFCtGmWYvwGCqObXgzmArX7o5JsFNsHXxayofk3m6no,2569
10
10
  comfy_env/resolver.py,sha256=l-AnmCE1puG6CvdpDB-KrsfG_cn_3uO2DryYizUnG_4,12474
11
11
  comfy_env/env/__init__.py,sha256=imQdoQEQvrRT-QDtyNpFlkVbm2fBzgACdpQwRPd09fI,1157
12
12
  comfy_env/env/config.py,sha256=5rK7r2uRItMXJnKAn8DmVQoadLo2njHTuaxrWybhppU,7469
13
13
  comfy_env/env/config_file.py,sha256=1UdcL1TwKceGaSunCnsHiuPyxpCSq1JpelScUEsCBn8,23669
14
14
  comfy_env/env/cuda_gpu_detection.py,sha256=YLuXUdWg6FeKdNyLlQAHPlveg4rTenXJ2VbeAaEi9QE,9755
15
- comfy_env/env/manager.py,sha256=zBBN5P0rOrXzPodoF2294xsk4F1Gg7CWZsn2MkxlWkw,25678
15
+ comfy_env/env/manager.py,sha256=wv_od7Rxa-qMlToUGzOhAsDvZY6C0P7y9ayqYiKKLPg,26460
16
16
  comfy_env/env/security.py,sha256=dNSitAnfBNVdvxgBBntYw33AJaCs_S1MHb7KJhAVYzM,8171
17
17
  comfy_env/env/platform/__init__.py,sha256=Nb5MPZIEeanSMEWwqU4p4bnEKTJn1tWcwobnhq9x9IY,614
18
18
  comfy_env/env/platform/base.py,sha256=iS0ptTTVjXRwPU4qWUdvHI7jteuzxGSjWr5BUQ7hGiU,2453
@@ -34,9 +34,9 @@ comfy_env/workers/pool.py,sha256=MtjeOWfvHSCockq8j1gfnxIl-t01GSB79T5N4YB82Lg,695
34
34
  comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaFLLq8,6409
35
35
  comfy_env/workers/torch_mp.py,sha256=4YSNPn7hALrvMVbkO4RkTeFTcc0lhfLMk5QTWjY4PHw,22134
36
36
  comfy_env/workers/venv.py,sha256=_ekHfZPqBIPY08DjqiXm6cTBQH4DrbxRWR3AAv3mit8,31589
37
- comfy_env/wheel_sources.yml,sha256=kZGK4-AJ0vvKmqDdxuiATLjGkaHHs-ansIckYION_nA,8871
38
- comfy_env-0.0.32.dist-info/METADATA,sha256=1IkItwJJn7EIvUCVfSTT3iq0MSh5d8PKsYxkk2LCtVo,5400
39
- comfy_env-0.0.32.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
40
- comfy_env-0.0.32.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
41
- comfy_env-0.0.32.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
42
- comfy_env-0.0.32.dist-info/RECORD,,
37
+ comfy_env/wheel_sources.yml,sha256=ep7husItiWik_8wUaVG5j1ttAw4NhA2daFjm2UCR7lA,8808
38
+ comfy_env-0.0.34.dist-info/METADATA,sha256=gOWb3KyliLVyLwp12wZBZb3JkeG8MTxetq3oRJnDmIM,5400
39
+ comfy_env-0.0.34.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
40
+ comfy_env-0.0.34.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
41
+ comfy_env-0.0.34.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
42
+ comfy_env-0.0.34.dist-info/RECORD,,