comfy-env 0.0.46__tar.gz → 0.0.48__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.46 → comfy_env-0.0.48}/PKG-INFO +1 -1
- {comfy_env-0.0.46 → comfy_env-0.0.48}/pyproject.toml +1 -1
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/cli.py +51 -1
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/workers/venv.py +13 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/.github/workflows/publish.yml +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/.gitignore +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/LICENSE +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/README.md +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/__init__.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/decorator.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/__init__.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/config.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/config_file.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/cuda_gpu_detection.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/manager.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/platform/__init__.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/platform/base.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/platform/darwin.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/platform/linux.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/platform/windows.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/env/security.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/errors.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/install.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/ipc/__init__.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/ipc/bridge.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/ipc/protocol.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/ipc/tensor.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/ipc/torch_bridge.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/ipc/transport.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/ipc/worker.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/nodes.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/pixi.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/registry.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/resolver.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/stubs/__init__.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/stubs/comfy/__init__.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/stubs/comfy/model_management.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/stubs/comfy/utils.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/stubs/folder_paths.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/wheel_sources.yml +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/workers/__init__.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/workers/base.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/workers/pool.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/workers/tensor_utils.py +0 -0
- {comfy_env-0.0.46 → comfy_env-0.0.48}/src/comfy_env/workers/torch_mp.py +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.48
|
|
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
|
|
@@ -42,6 +42,18 @@ def main(args: Optional[List[str]] = None) -> int:
|
|
|
42
42
|
|
|
43
43
|
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
44
44
|
|
|
45
|
+
# init command
|
|
46
|
+
init_parser = subparsers.add_parser(
|
|
47
|
+
"init",
|
|
48
|
+
help="Create a default comfy-env.toml config file",
|
|
49
|
+
description="Initialize a new comfy-env.toml configuration file in the current directory",
|
|
50
|
+
)
|
|
51
|
+
init_parser.add_argument(
|
|
52
|
+
"--force", "-f",
|
|
53
|
+
action="store_true",
|
|
54
|
+
help="Overwrite existing config file",
|
|
55
|
+
)
|
|
56
|
+
|
|
45
57
|
# install command
|
|
46
58
|
install_parser = subparsers.add_parser(
|
|
47
59
|
"install",
|
|
@@ -134,7 +146,9 @@ def main(args: Optional[List[str]] = None) -> int:
|
|
|
134
146
|
return 0
|
|
135
147
|
|
|
136
148
|
try:
|
|
137
|
-
if parsed.command == "
|
|
149
|
+
if parsed.command == "init":
|
|
150
|
+
return cmd_init(parsed)
|
|
151
|
+
elif parsed.command == "install":
|
|
138
152
|
return cmd_install(parsed)
|
|
139
153
|
elif parsed.command == "info":
|
|
140
154
|
return cmd_info(parsed)
|
|
@@ -155,6 +169,42 @@ def main(args: Optional[List[str]] = None) -> int:
|
|
|
155
169
|
return 1
|
|
156
170
|
|
|
157
171
|
|
|
172
|
+
DEFAULT_CONFIG = """\
|
|
173
|
+
# comfy-env.toml - Environment configuration for ComfyUI custom nodes
|
|
174
|
+
# Documentation: https://github.com/PozzettiAndrea/comfy-env
|
|
175
|
+
|
|
176
|
+
[system]
|
|
177
|
+
# System packages required (apt on Linux, brew on macOS)
|
|
178
|
+
linux = []
|
|
179
|
+
|
|
180
|
+
[environment]
|
|
181
|
+
python = "3.11"
|
|
182
|
+
cuda_version = "auto"
|
|
183
|
+
pytorch_version = "auto"
|
|
184
|
+
|
|
185
|
+
[environment.cuda]
|
|
186
|
+
# CUDA packages from comfy-env registry
|
|
187
|
+
# Example: nvdiffrast = "0.4.0"
|
|
188
|
+
|
|
189
|
+
[environment.packages]
|
|
190
|
+
requirements = []
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def cmd_init(args) -> int:
|
|
195
|
+
"""Handle init command."""
|
|
196
|
+
config_path = Path.cwd() / "comfy-env.toml"
|
|
197
|
+
|
|
198
|
+
if config_path.exists() and not args.force:
|
|
199
|
+
print(f"Config file already exists: {config_path}", file=sys.stderr)
|
|
200
|
+
print("Use --force to overwrite", file=sys.stderr)
|
|
201
|
+
return 1
|
|
202
|
+
|
|
203
|
+
config_path.write_text(DEFAULT_CONFIG)
|
|
204
|
+
print(f"Created {config_path}")
|
|
205
|
+
return 0
|
|
206
|
+
|
|
207
|
+
|
|
158
208
|
def cmd_install(args) -> int:
|
|
159
209
|
"""Handle install command."""
|
|
160
210
|
from .install import install
|
|
@@ -475,6 +475,12 @@ class VenvWorker(Worker):
|
|
|
475
475
|
env.update(self.extra_env)
|
|
476
476
|
env["COMFYUI_ISOLATION_WORKER"] = "1"
|
|
477
477
|
|
|
478
|
+
# For conda/pixi environments, add lib dir to LD_LIBRARY_PATH
|
|
479
|
+
lib_dir = self.python.parent.parent / "lib"
|
|
480
|
+
if lib_dir.is_dir():
|
|
481
|
+
existing = env.get("LD_LIBRARY_PATH", "")
|
|
482
|
+
env["LD_LIBRARY_PATH"] = f"{lib_dir}:{existing}" if existing else str(lib_dir)
|
|
483
|
+
|
|
478
484
|
# Run subprocess
|
|
479
485
|
cmd = [
|
|
480
486
|
str(self.python),
|
|
@@ -843,6 +849,13 @@ class PersistentVenvWorker(Worker):
|
|
|
843
849
|
env.update(self.extra_env)
|
|
844
850
|
env["COMFYUI_ISOLATION_WORKER"] = "1"
|
|
845
851
|
|
|
852
|
+
# For conda/pixi environments, add lib dir to LD_LIBRARY_PATH
|
|
853
|
+
# This ensures libraries like libstdc++ from the env are used
|
|
854
|
+
lib_dir = self.python.parent.parent / "lib"
|
|
855
|
+
if lib_dir.is_dir():
|
|
856
|
+
existing = env.get("LD_LIBRARY_PATH", "")
|
|
857
|
+
env["LD_LIBRARY_PATH"] = f"{lib_dir}:{existing}" if existing else str(lib_dir)
|
|
858
|
+
|
|
846
859
|
# On Windows, pass host Python directory so worker can add it via os.add_dll_directory()
|
|
847
860
|
# This fixes "DLL load failed" errors for packages like opencv-python-headless
|
|
848
861
|
if sys.platform == "win32":
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|