comfy-env 0.1.5__tar.gz → 0.1.7__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.5 → comfy_env-0.1.7}/PKG-INFO +1 -1
- {comfy_env-0.1.5 → comfy_env-0.1.7}/pyproject.toml +1 -1
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/workers/mp.py +28 -7
- {comfy_env-0.1.5 → comfy_env-0.1.7}/.github/workflows/ci.yml +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/.github/workflows/publish.yml +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/.gitignore +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/LICENSE +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/README.md +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/__init__.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/cli.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/config/__init__.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/config/parser.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/config/types.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/errors.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/install.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/isolation/__init__.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/isolation/wrap.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/nodes.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/__init__.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/core.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/cuda_detection.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/platform/__init__.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/platform/base.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/platform/darwin.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/platform/linux.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/platform/windows.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/pixi/resolver.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/prestartup.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/templates/comfy-env-instructions.txt +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/templates/comfy-env.toml +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/workers/__init__.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/workers/base.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/workers/subprocess.py +0 -0
- {comfy_env-0.1.5 → comfy_env-0.1.7}/src/comfy_env/workers/tensor_utils.py +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.7
|
|
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
|
|
@@ -40,8 +40,8 @@ _SHUTDOWN = object()
|
|
|
40
40
|
_CALL_METHOD = "call_method"
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
def _dump_worker_env(worker_name: str = "unknown"):
|
|
44
|
-
"""Dump worker environment to .comfy-env/logs/
|
|
43
|
+
def _dump_worker_env(worker_name: str = "unknown", print_to_terminal: bool = False):
|
|
44
|
+
"""Dump worker environment to .comfy-env/logs/ (always) and optionally print."""
|
|
45
45
|
import json
|
|
46
46
|
import os
|
|
47
47
|
import platform
|
|
@@ -74,7 +74,18 @@ def _dump_worker_env(worker_name: str = "unknown"):
|
|
|
74
74
|
|
|
75
75
|
log_file = log_dir / f"worker_{worker_name}_{os.getpid()}.json"
|
|
76
76
|
log_file.write_text(json.dumps(debug_info, indent=2, default=str))
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
if print_to_terminal:
|
|
79
|
+
print(f"[comfy-env] === WORKER ENV DEBUG: {worker_name} ===")
|
|
80
|
+
print(f"[comfy-env] Python: {sys.executable}")
|
|
81
|
+
print(f"[comfy-env] Version: {sys.version.split()[0]}")
|
|
82
|
+
print(f"[comfy-env] PID: {os.getpid()}, CWD: {os.getcwd()}")
|
|
83
|
+
for var in ['PATH', 'LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PYTHONPATH', 'OMP_NUM_THREADS', 'KMP_DUPLICATE_LIB_OK']:
|
|
84
|
+
val = os.environ.get(var, '<unset>')
|
|
85
|
+
if len(val) > 100:
|
|
86
|
+
val = val[:100] + '...'
|
|
87
|
+
print(f"[comfy-env] {var}={val}")
|
|
88
|
+
print(f"[comfy-env] Env dumped to: {log_file}")
|
|
78
89
|
|
|
79
90
|
|
|
80
91
|
def _worker_loop(queue_in, queue_out, sys_path_additions=None, lib_path=None, env_vars=None, worker_name=None):
|
|
@@ -107,9 +118,9 @@ def _worker_loop(queue_in, queue_out, sys_path_additions=None, lib_path=None, en
|
|
|
107
118
|
# Set worker mode env var
|
|
108
119
|
os.environ["COMFYUI_ISOLATION_WORKER"] = "1"
|
|
109
120
|
|
|
110
|
-
#
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
# Always dump env to file, print to terminal if debug enabled
|
|
122
|
+
print_debug = os.environ.get("COMFY_ENV_DEBUG", "").lower() in ("1", "true", "yes")
|
|
123
|
+
_dump_worker_env(worker_name or "unknown", print_to_terminal=print_debug)
|
|
113
124
|
|
|
114
125
|
# DLL/library isolation - match SubprocessWorker's isolation level
|
|
115
126
|
# Filter out conflicting paths from conda/mamba/etc and use proper DLL registration
|
|
@@ -132,8 +143,18 @@ def _worker_loop(queue_in, queue_out, sys_path_additions=None, lib_path=None, en
|
|
|
132
143
|
if lib_path:
|
|
133
144
|
clean_parts.insert(0, lib_path)
|
|
134
145
|
os.environ["PATH"] = path_sep.join(clean_parts)
|
|
146
|
+
elif sys.platform == "darwin":
|
|
147
|
+
# macOS: Use DYLD_LIBRARY_PATH
|
|
148
|
+
current = os.environ.get("DYLD_LIBRARY_PATH", "")
|
|
149
|
+
clean_parts = [
|
|
150
|
+
p for p in current.split(path_sep) if p
|
|
151
|
+
and not any(x in p.lower() for x in (".ct-envs", "conda", "mamba", "miniforge", "miniconda", "anaconda"))
|
|
152
|
+
]
|
|
153
|
+
if lib_path:
|
|
154
|
+
clean_parts.insert(0, lib_path)
|
|
155
|
+
os.environ["DYLD_LIBRARY_PATH"] = path_sep.join(clean_parts)
|
|
135
156
|
else:
|
|
136
|
-
# Linux
|
|
157
|
+
# Linux: Use LD_LIBRARY_PATH
|
|
137
158
|
current = os.environ.get("LD_LIBRARY_PATH", "")
|
|
138
159
|
clean_parts = [
|
|
139
160
|
p for p in current.split(path_sep) if p
|
|
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
|