comfy-env 0.0.32__tar.gz → 0.0.34__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.
- {comfy_env-0.0.32 → comfy_env-0.0.34}/PKG-INFO +1 -1
- {comfy_env-0.0.32 → comfy_env-0.0.34}/pyproject.toml +1 -1
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/manager.py +21 -9
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/install.py +15 -6
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/pixi.py +26 -1
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/wheel_sources.yml +3 -3
- {comfy_env-0.0.32 → comfy_env-0.0.34}/.github/workflows/publish.yml +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/.gitignore +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/LICENSE +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/README.md +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/__init__.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/cli.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/decorator.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/__init__.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/config.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/config_file.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/cuda_gpu_detection.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/platform/__init__.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/platform/base.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/platform/darwin.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/platform/linux.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/platform/windows.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/env/security.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/errors.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/index_resolver.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/ipc/__init__.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/ipc/bridge.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/ipc/protocol.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/ipc/tensor.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/ipc/torch_bridge.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/ipc/transport.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/ipc/worker.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/nodes.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/registry.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/resolver.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/stubs/__init__.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/stubs/folder_paths.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/workers/__init__.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/workers/base.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/workers/pool.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/workers/tensor_utils.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/workers/torch_mp.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/src/comfy_env/workers/venv.py +0 -0
- {comfy_env-0.0.32 → comfy_env-0.0.34}/untitled.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comfy-env
|
|
3
|
-
Version: 0.0.
|
|
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
|
|
@@ -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 -
|
|
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
|
-
|
|
400
|
-
|
|
401
|
-
|
|
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
|
-
|
|
416
|
-
|
|
417
|
-
|
|
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
|
|
@@ -475,7 +475,7 @@ def _install_cuda_package(
|
|
|
475
475
|
method = config["method"]
|
|
476
476
|
|
|
477
477
|
if method == "index":
|
|
478
|
-
# PEP 503 index -
|
|
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
|
-
|
|
499
|
+
_pip_install_with_index(pkg_spec, index_url, log)
|
|
497
500
|
|
|
498
501
|
elif method == "github_index":
|
|
499
|
-
# GitHub Pages index -
|
|
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
|
-
|
|
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) -
|
|
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
|
-
|
|
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
|
|
@@ -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 -
|
|
53
|
-
# https://github.com/
|
|
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://
|
|
57
|
+
index_url: "https://miropsota.github.io/torch_packages_builder/pytorch3d/"
|
|
58
58
|
description: PyTorch3D - 3D deep learning library
|
|
59
59
|
|
|
60
60
|
# ===========================================================================
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|