comfy-env 0.1.24__tar.gz → 0.1.26__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.1.24 → comfy_env-0.1.26}/PKG-INFO +2 -1
- {comfy_env-0.1.24 → comfy_env-0.1.26}/pyproject.toml +2 -1
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/environment/cache.py +6 -3
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/install.py +2 -2
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/isolation/workers/subprocess.py +6 -1
- {comfy_env-0.1.24 → comfy_env-0.1.26}/.github/workflows/ci.yml +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/.github/workflows/publish.yml +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/.gitignore +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/LICENSE +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/README.md +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/__init__.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/cli.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/config/__init__.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/config/parser.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/config/types.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/detection/__init__.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/detection/cuda.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/detection/gpu.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/detection/platform.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/detection/runtime.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/environment/__init__.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/environment/libomp.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/environment/paths.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/environment/setup.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/isolation/__init__.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/isolation/tensor_utils.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/isolation/workers/__init__.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/isolation/workers/base.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/isolation/wrap.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/packages/__init__.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/packages/apt.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/packages/cuda_wheels.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/packages/node_dependencies.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/packages/pixi.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/packages/toml_generator.py +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/templates/comfy-env-instructions.txt +0 -0
- {comfy_env-0.1.24 → comfy_env-0.1.26}/src/comfy_env/templates/comfy-env.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comfy-env
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.26
|
|
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
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
20
|
Requires-Dist: numpy
|
|
21
21
|
Requires-Dist: pip>=21.0
|
|
22
|
+
Requires-Dist: pixi>=0.40.0
|
|
22
23
|
Requires-Dist: tomli-w>=1.0.0
|
|
23
24
|
Requires-Dist: tomli>=2.0.0
|
|
24
25
|
Requires-Dist: uv>=0.4.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "comfy-env"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.26"
|
|
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"}
|
|
@@ -22,6 +22,7 @@ dependencies = [
|
|
|
22
22
|
"tomli>=2.0.0",
|
|
23
23
|
"tomli-w>=1.0.0",
|
|
24
24
|
"uv>=0.4.0",
|
|
25
|
+
"pixi>=0.40.0",
|
|
25
26
|
"pip>=21.0",
|
|
26
27
|
"numpy",
|
|
27
28
|
]
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import glob
|
|
4
4
|
import hashlib
|
|
5
|
+
import os
|
|
5
6
|
import shutil
|
|
6
7
|
import sys
|
|
7
8
|
from datetime import datetime
|
|
@@ -16,14 +17,16 @@ try:
|
|
|
16
17
|
except ImportError:
|
|
17
18
|
__version__ = "0.0.0-dev"
|
|
18
19
|
|
|
19
|
-
CACHE_DIR = Path.home() / ".comfy-env" / "envs"
|
|
20
|
+
CACHE_DIR = Path.home() / ".comfy-env" / "envs" # Default, use get_cache_dir() for dynamic lookup
|
|
20
21
|
MARKER_FILE = ".comfy-env-marker.toml"
|
|
21
22
|
METADATA_FILE = ".comfy-env-metadata.toml"
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
def get_cache_dir() -> Path:
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
"""Get cache dir, checking COMFY_ENV_CACHE_DIR env var each time."""
|
|
27
|
+
cache_dir = Path(os.environ.get("COMFY_ENV_CACHE_DIR", Path.home() / ".comfy-env" / "envs"))
|
|
28
|
+
cache_dir.mkdir(parents=True, exist_ok=True)
|
|
29
|
+
return cache_dir
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
def compute_config_hash(config_path: Path) -> str:
|
|
@@ -151,7 +151,7 @@ def _install_via_pixi(cfg: ComfyEnvConfig, node_dir: Path, log: Callable[[str],
|
|
|
151
151
|
log("Running pixi install...")
|
|
152
152
|
result = subprocess.run([str(pixi_path), "install"], cwd=node_dir, capture_output=True, text=True)
|
|
153
153
|
if result.returncode != 0:
|
|
154
|
-
raise RuntimeError(f"pixi install failed: {result.stderr}")
|
|
154
|
+
raise RuntimeError(f"pixi install failed:\nstderr: {result.stderr}\nstdout: {result.stdout}")
|
|
155
155
|
|
|
156
156
|
if cfg.cuda_packages and cuda_version:
|
|
157
157
|
log(f"Installing CUDA packages...")
|
|
@@ -171,7 +171,7 @@ def _install_via_pixi(cfg: ComfyEnvConfig, node_dir: Path, log: Callable[[str],
|
|
|
171
171
|
result = subprocess.run([str(python_path), "-m", "pip", "install", "--no-deps", "--no-cache-dir", wheel_url],
|
|
172
172
|
capture_output=True, text=True)
|
|
173
173
|
if result.returncode != 0:
|
|
174
|
-
raise RuntimeError(f"Failed: {result.stderr}")
|
|
174
|
+
raise RuntimeError(f"Failed to install {package}:\nstderr: {result.stderr}\nstdout: {result.stdout}")
|
|
175
175
|
|
|
176
176
|
# Find config file for marker
|
|
177
177
|
config_path = node_dir / CONFIG_FILE_NAME
|
|
@@ -668,7 +668,10 @@ def _to_shm(obj, registry, visited=None):
|
|
|
668
668
|
visited = {}
|
|
669
669
|
obj_id = id(obj)
|
|
670
670
|
if obj_id in visited:
|
|
671
|
-
|
|
671
|
+
cached = visited[obj_id]
|
|
672
|
+
if isinstance(cached, dict) and cached.get("__type__") == "TensorRef":
|
|
673
|
+
print(f"[SHM DEBUG] _to_shm CACHE HIT: id={obj_id} -> storage_key=...{cached.get('storage_key','?')[-20:]}, tensor_size={cached.get('tensor_size')}", file=sys.stderr)
|
|
674
|
+
return cached
|
|
672
675
|
t = type(obj).__name__
|
|
673
676
|
|
|
674
677
|
# Tensor -> use PyTorch's native shared memory (bypasses resource_tracker)
|
|
@@ -676,6 +679,7 @@ def _to_shm(obj, registry, visited=None):
|
|
|
676
679
|
import torch
|
|
677
680
|
tensor = obj.detach().cpu().contiguous()
|
|
678
681
|
result = _serialize_tensor_native(tensor, registry)
|
|
682
|
+
print(f"[SHM DEBUG] _to_shm Tensor: id={obj_id}, orig_shape={list(obj.shape)}, new_shape={list(tensor.shape)} -> storage_key=...{result.get('storage_key','?')[-20:]}, tensor_size={result.get('tensor_size')}", file=sys.stderr)
|
|
679
683
|
visited[obj_id] = result
|
|
680
684
|
return result
|
|
681
685
|
|
|
@@ -769,6 +773,7 @@ def _from_shm(obj):
|
|
|
769
773
|
# TensorRef -> use PyTorch's native deserialization (new format, worker->parent)
|
|
770
774
|
if obj.get("__type__") == "TensorRef":
|
|
771
775
|
tensor = _deserialize_tensor_native(obj)
|
|
776
|
+
print(f"[SHM DEBUG] _from_shm TensorRef: storage_key=...{obj.get('storage_key','?')[-20:]}, expected_size={obj.get('tensor_size')} -> actual_shape={list(tensor.shape)}", file=sys.stderr)
|
|
772
777
|
# Convert back to numpy if it was originally numpy
|
|
773
778
|
if obj.get("__was_numpy__"):
|
|
774
779
|
return tensor.numpy()
|
|
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
|