comfy-env 0.0.68__py3-none-any.whl → 0.0.70__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/config/parser.py +6 -1
- comfy_env/config/types.py +3 -0
- comfy_env/install.py +1 -1
- comfy_env/pixi/core.py +15 -24
- {comfy_env-0.0.68.dist-info → comfy_env-0.0.70.dist-info}/METADATA +1 -1
- {comfy_env-0.0.68.dist-info → comfy_env-0.0.70.dist-info}/RECORD +9 -9
- {comfy_env-0.0.68.dist-info → comfy_env-0.0.70.dist-info}/WHEEL +0 -0
- {comfy_env-0.0.68.dist-info → comfy_env-0.0.70.dist-info}/entry_points.txt +0 -0
- {comfy_env-0.0.68.dist-info → comfy_env-0.0.70.dist-info}/licenses/LICENSE +0 -0
comfy_env/config/parser.py
CHANGED
|
@@ -49,7 +49,7 @@ from .types import ComfyEnvConfig, NodeReq
|
|
|
49
49
|
CONFIG_FILE_NAME = "comfy-env.toml"
|
|
50
50
|
|
|
51
51
|
# Sections we handle specially (not passed through to pixi.toml)
|
|
52
|
-
CUSTOM_SECTIONS = {"python", "cuda", "node_reqs"}
|
|
52
|
+
CUSTOM_SECTIONS = {"python", "cuda", "node_reqs", "apt"}
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
def load_config(path: Path) -> ComfyEnvConfig:
|
|
@@ -116,6 +116,10 @@ def _parse_config(data: Dict[str, Any]) -> ComfyEnvConfig:
|
|
|
116
116
|
cuda_data = data.pop("cuda", {})
|
|
117
117
|
cuda_packages = _ensure_list(cuda_data.get("packages", []))
|
|
118
118
|
|
|
119
|
+
# Extract [apt] section
|
|
120
|
+
apt_data = data.pop("apt", {})
|
|
121
|
+
apt_packages = _ensure_list(apt_data.get("packages", []))
|
|
122
|
+
|
|
119
123
|
# Extract [node_reqs] section
|
|
120
124
|
node_reqs_data = data.pop("node_reqs", {})
|
|
121
125
|
node_reqs = _parse_node_reqs(node_reqs_data)
|
|
@@ -126,6 +130,7 @@ def _parse_config(data: Dict[str, Any]) -> ComfyEnvConfig:
|
|
|
126
130
|
return ComfyEnvConfig(
|
|
127
131
|
python=python_version,
|
|
128
132
|
cuda_packages=cuda_packages,
|
|
133
|
+
apt_packages=apt_packages,
|
|
129
134
|
node_reqs=node_reqs,
|
|
130
135
|
pixi_passthrough=pixi_passthrough,
|
|
131
136
|
)
|
comfy_env/config/types.py
CHANGED
|
@@ -53,6 +53,9 @@ class ComfyEnvConfig:
|
|
|
53
53
|
# [cuda] - CUDA packages (installed via find-links index)
|
|
54
54
|
cuda_packages: List[str] = field(default_factory=list)
|
|
55
55
|
|
|
56
|
+
# [apt] - System packages to install via apt (Linux only)
|
|
57
|
+
apt_packages: List[str] = field(default_factory=list)
|
|
58
|
+
|
|
56
59
|
# [node_reqs] - other ComfyUI nodes to clone
|
|
57
60
|
node_reqs: List[NodeReq] = field(default_factory=list)
|
|
58
61
|
|
comfy_env/install.py
CHANGED
comfy_env/pixi/core.py
CHANGED
|
@@ -172,7 +172,6 @@ def pixi_install(
|
|
|
172
172
|
cfg: ComfyEnvConfig,
|
|
173
173
|
node_dir: Path,
|
|
174
174
|
log: Callable[[str], None] = print,
|
|
175
|
-
create_env_link: bool = False,
|
|
176
175
|
) -> bool:
|
|
177
176
|
"""
|
|
178
177
|
Install all packages via pixi.
|
|
@@ -188,7 +187,6 @@ def pixi_install(
|
|
|
188
187
|
cfg: ComfyEnvConfig with packages to install.
|
|
189
188
|
node_dir: Directory to install in.
|
|
190
189
|
log: Logging callback.
|
|
191
|
-
create_env_link: If True, create _env_<name> symlink for isolation.
|
|
192
190
|
|
|
193
191
|
Returns:
|
|
194
192
|
True if installation succeeded.
|
|
@@ -217,9 +215,24 @@ def pixi_install(
|
|
|
217
215
|
else:
|
|
218
216
|
log("Warning: CUDA packages requested but no GPU detected")
|
|
219
217
|
|
|
218
|
+
# Install system dependencies on Linux via apt
|
|
219
|
+
if sys.platform == "linux" and cfg.apt_packages:
|
|
220
|
+
log(f"Installing apt packages: {cfg.apt_packages}")
|
|
221
|
+
subprocess.run(["sudo", "apt-get", "update"], capture_output=True)
|
|
222
|
+
subprocess.run(
|
|
223
|
+
["sudo", "apt-get", "install", "-y"] + cfg.apt_packages,
|
|
224
|
+
capture_output=True,
|
|
225
|
+
)
|
|
226
|
+
|
|
220
227
|
# Clean previous artifacts
|
|
221
228
|
clean_pixi_artifacts(node_dir, log)
|
|
222
229
|
|
|
230
|
+
# Create .pixi/config.toml to ensure inline (non-detached) environments
|
|
231
|
+
pixi_config_dir = node_dir / ".pixi"
|
|
232
|
+
pixi_config_dir.mkdir(parents=True, exist_ok=True)
|
|
233
|
+
pixi_config_file = pixi_config_dir / "config.toml"
|
|
234
|
+
pixi_config_file.write_text("detached-environments = false\n")
|
|
235
|
+
|
|
223
236
|
# Ensure pixi is installed
|
|
224
237
|
pixi_path = ensure_pixi(log=log)
|
|
225
238
|
|
|
@@ -324,27 +337,5 @@ def pixi_install(
|
|
|
324
337
|
|
|
325
338
|
log("CUDA packages installed")
|
|
326
339
|
|
|
327
|
-
# Create symlink/junction to _env_<name> for discovery (only for isolated subdirs)
|
|
328
|
-
if create_env_link:
|
|
329
|
-
env_dir = node_dir / ".pixi" / "envs" / "default"
|
|
330
|
-
env_link = node_dir / f"_env_{node_dir.name}"
|
|
331
|
-
if env_dir.exists():
|
|
332
|
-
# Remove existing link/dir if present
|
|
333
|
-
if env_link.is_symlink() or env_link.exists():
|
|
334
|
-
if env_link.is_symlink():
|
|
335
|
-
env_link.unlink()
|
|
336
|
-
else:
|
|
337
|
-
shutil.rmtree(env_link)
|
|
338
|
-
# Create symlink (Linux/Mac) or junction (Windows)
|
|
339
|
-
if sys.platform == "win32":
|
|
340
|
-
# Use junction on Windows
|
|
341
|
-
subprocess.run(
|
|
342
|
-
["cmd", "/c", "mklink", "/J", str(env_link), str(env_dir)],
|
|
343
|
-
capture_output=True,
|
|
344
|
-
)
|
|
345
|
-
else:
|
|
346
|
-
env_link.symlink_to(env_dir)
|
|
347
|
-
log(f"Linked: {env_link.name} -> .pixi/envs/default")
|
|
348
|
-
|
|
349
340
|
log("Installation complete!")
|
|
350
341
|
return True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comfy-env
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.70
|
|
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
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
comfy_env/__init__.py,sha256=s0RkyKsBlDiSI4ZSwivtWLvYhc8DS0CUEWgFLVJbtLA,2176
|
|
2
2
|
comfy_env/cli.py,sha256=ky7jC8eArKbjgYw9Uy52MKajmtLb16wYblrbEOoiy2U,9599
|
|
3
3
|
comfy_env/errors.py,sha256=q-C3vyrPa_kk_Ao8l17mIGfJiG2IR0hCFV0GFcNLmcI,9924
|
|
4
|
-
comfy_env/install.py,sha256=
|
|
4
|
+
comfy_env/install.py,sha256=Fkjk3ci9_mAabUFqyuXShV9-Ry2iTX-JWAx9fnr5q_Q,5098
|
|
5
5
|
comfy_env/nodes.py,sha256=nBkG2pESeOt5kXSgTDIHAHaVdHK8-rEueR3BxXWn6TE,4354
|
|
6
6
|
comfy_env/prestartup.py,sha256=_b9QIWsHzkQD5VYdiyn0beHMLoWx18aC4RKB8SlJiGE,2048
|
|
7
7
|
comfy_env/config/__init__.py,sha256=4Guylkb-FV8QxhFwschzpzbr2eu8y-KNgNT3_JOm9jc,403
|
|
8
|
-
comfy_env/config/parser.py,sha256=
|
|
9
|
-
comfy_env/config/types.py,sha256=
|
|
8
|
+
comfy_env/config/parser.py,sha256=V3jjrCqkRDBAE-wmYjbwy6D6rt1Lg5rJk_hQMRbbdls,4106
|
|
9
|
+
comfy_env/config/types.py,sha256=EqXj6fjZDZo0gmTMC-8jbShkONSociPVAmWztFbP_bE,2007
|
|
10
10
|
comfy_env/isolation/__init__.py,sha256=vw9a4mpJ2CFjy-PLe_A3zQ6umBQklgqWNxwn9beNw3g,175
|
|
11
11
|
comfy_env/isolation/wrap.py,sha256=9bXxK9h4FMrFL9k4EAdILWxkjXYytVCJV68MuwwufK8,11485
|
|
12
12
|
comfy_env/pixi/__init__.py,sha256=BUrq7AQf3WDm0cHWh72B2xZbURNnDu2dCuELWiQCUiM,997
|
|
13
|
-
comfy_env/pixi/core.py,sha256=
|
|
13
|
+
comfy_env/pixi/core.py,sha256=QYjRkMYMzcX_1akMLRTn8OQE-96lHKbfvKGvXHACpHM,12073
|
|
14
14
|
comfy_env/pixi/cuda_detection.py,sha256=sqB3LjvGNdV4eFqiARQGfyecBM3ZiUmeh6nG0YCRYQw,9751
|
|
15
15
|
comfy_env/pixi/resolver.py,sha256=U_A8rBDxCj4gUlJt2YJQniP4cCKqxJEiVFgXOoH7vM8,6339
|
|
16
16
|
comfy_env/pixi/platform/__init__.py,sha256=Nb5MPZIEeanSMEWwqU4p4bnEKTJn1tWcwobnhq9x9IY,614
|
|
@@ -25,8 +25,8 @@ comfy_env/workers/base.py,sha256=4ZYTaQ4J0kBHCoO_OfZnsowm4rJCoqinZUaOtgkOPbw,230
|
|
|
25
25
|
comfy_env/workers/mp.py,sha256=d6PFVrgqp3MK7Gkt08a8LQD_VSwHtoIcGx2Lovou3vM,25972
|
|
26
26
|
comfy_env/workers/subprocess.py,sha256=UMhKhaJoSjv2-FWnwQq9TeMWtaDLIs3ajAFTq1ngdJw,57844
|
|
27
27
|
comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaFLLq8,6409
|
|
28
|
-
comfy_env-0.0.
|
|
29
|
-
comfy_env-0.0.
|
|
30
|
-
comfy_env-0.0.
|
|
31
|
-
comfy_env-0.0.
|
|
32
|
-
comfy_env-0.0.
|
|
28
|
+
comfy_env-0.0.70.dist-info/METADATA,sha256=rRtj1UI_WV0OVWVWHV3yRB3bEtfg70qDMhhzfcveMI4,6946
|
|
29
|
+
comfy_env-0.0.70.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
30
|
+
comfy_env-0.0.70.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
|
|
31
|
+
comfy_env-0.0.70.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
|
|
32
|
+
comfy_env-0.0.70.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|