comfy-env 0.0.49__py3-none-any.whl → 0.0.50__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/__init__.py +7 -0
- comfy_env/decorator.py +252 -1
- comfy_env/env/config.py +2 -0
- comfy_env/env/config_file.py +4 -0
- comfy_env/install.py +38 -104
- comfy_env/isolation.py +297 -0
- comfy_env/pixi.py +124 -24
- comfy_env/stub_imports.py +310 -0
- comfy_env/templates/comfy-env-instructions.txt +31 -10
- comfy_env/templates/comfy-env.toml +36 -61
- comfy_env/workers/venv.py +91 -2
- {comfy_env-0.0.49.dist-info → comfy_env-0.0.50.dist-info}/METADATA +62 -4
- {comfy_env-0.0.49.dist-info → comfy_env-0.0.50.dist-info}/RECORD +16 -14
- {comfy_env-0.0.49.dist-info → comfy_env-0.0.50.dist-info}/WHEEL +0 -0
- {comfy_env-0.0.49.dist-info → comfy_env-0.0.50.dist-info}/entry_points.txt +0 -0
- {comfy_env-0.0.49.dist-info → comfy_env-0.0.50.dist-info}/licenses/LICENSE +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.50
|
|
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
|
|
@@ -84,9 +84,47 @@ from comfy_env import install
|
|
|
84
84
|
install()
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
### Process Isolation (Type 1 - Separate
|
|
87
|
+
### Process Isolation (Type 1 - Separate Environment)
|
|
88
88
|
|
|
89
|
-
For nodes that need completely separate dependencies
|
|
89
|
+
For nodes that need completely separate dependencies (different Python version, conda packages, conflicting libraries).
|
|
90
|
+
|
|
91
|
+
#### Recommended: Pack-Wide Isolation
|
|
92
|
+
|
|
93
|
+
For node packs where ALL nodes run in the same isolated environment:
|
|
94
|
+
|
|
95
|
+
**Step 1: Configure comfy-env.toml**
|
|
96
|
+
|
|
97
|
+
```toml
|
|
98
|
+
[mypack]
|
|
99
|
+
python = "3.11"
|
|
100
|
+
isolated = true # All nodes run in this env
|
|
101
|
+
|
|
102
|
+
[mypack.conda]
|
|
103
|
+
packages = ["cgal"] # Conda packages (uses pixi)
|
|
104
|
+
|
|
105
|
+
[mypack.packages]
|
|
106
|
+
requirements = ["trimesh[easy]>=4.0", "bpy>=4.2"]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Step 2: Enable in __init__.py**
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from comfy_env import setup_isolated_imports, enable_isolation
|
|
113
|
+
|
|
114
|
+
# Setup import stubs BEFORE importing nodes
|
|
115
|
+
setup_isolated_imports(__file__)
|
|
116
|
+
|
|
117
|
+
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
|
118
|
+
|
|
119
|
+
# Enable isolation for all nodes
|
|
120
|
+
enable_isolation(NODE_CLASS_MAPPINGS)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**That's it!** All nodes run in an isolated Python 3.11 environment with their own dependencies.
|
|
124
|
+
|
|
125
|
+
#### Alternative: Per-Node Isolation
|
|
126
|
+
|
|
127
|
+
For cases where different nodes need different environments:
|
|
90
128
|
|
|
91
129
|
```python
|
|
92
130
|
from comfy_env import isolated
|
|
@@ -266,7 +304,27 @@ vars_dict = env.as_dict()
|
|
|
266
304
|
# {'cuda_version': '12.8', 'cuda_short': '128', 'torch_mm': '28', ...}
|
|
267
305
|
```
|
|
268
306
|
|
|
269
|
-
###
|
|
307
|
+
### enable_isolation()
|
|
308
|
+
|
|
309
|
+
```python
|
|
310
|
+
from comfy_env import enable_isolation
|
|
311
|
+
|
|
312
|
+
enable_isolation(NODE_CLASS_MAPPINGS)
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Wraps all node classes so their FUNCTION methods run in the isolated environment specified in comfy-env.toml. Requires `isolated = true` in the environment config.
|
|
316
|
+
|
|
317
|
+
### setup_isolated_imports()
|
|
318
|
+
|
|
319
|
+
```python
|
|
320
|
+
from comfy_env import setup_isolated_imports
|
|
321
|
+
|
|
322
|
+
setup_isolated_imports(__file__)
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Sets up import stubs for packages that exist only in the isolated pixi environment. Call this BEFORE importing your nodes module. Packages available in both host and isolated environment are not stubbed.
|
|
326
|
+
|
|
327
|
+
### Workers (for custom isolation)
|
|
270
328
|
|
|
271
329
|
```python
|
|
272
330
|
from comfy_env import TorchMPWorker
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
comfy_env/__init__.py,sha256=
|
|
1
|
+
comfy_env/__init__.py,sha256=DvOCFCq-EuXZ_e6vsPCObgTPYSRLZqiG3w35SOD-e4E,4101
|
|
2
2
|
comfy_env/cli.py,sha256=Pjzb-jsoH67lyHxmBFOWvasWX01eHFE_BEjUk1l-uEo,14509
|
|
3
|
-
comfy_env/decorator.py,sha256=
|
|
3
|
+
comfy_env/decorator.py,sha256=bL0eUjXf5UAGbsT2zilZbO0e8ZbhtQAR3vDJLbMO3ZI,27018
|
|
4
4
|
comfy_env/errors.py,sha256=8hN8NDlo8oBUdapc-eT3ZluigI5VBzfqsSBvQdfWlz4,9943
|
|
5
|
-
comfy_env/install.py,sha256=
|
|
5
|
+
comfy_env/install.py,sha256=b2eXFqQ58pUBWpwc1AhymbTh7dGRMnEuq5FoZot0CO0,15661
|
|
6
|
+
comfy_env/isolation.py,sha256=wuze8TmkRbdMfrg2cj9quoGYJWsxKcc5iiDvmLWX16g,8680
|
|
6
7
|
comfy_env/nodes.py,sha256=CWUe35jU5SKk4ur-SddZePdqWgxJDlxGhpcJiu5pAK4,4354
|
|
7
|
-
comfy_env/pixi.py,sha256=
|
|
8
|
+
comfy_env/pixi.py,sha256=iKC1G7HOBLw6sJ3CqZuTwKPtstB5UK8aj7ID3IgjLzM,19248
|
|
8
9
|
comfy_env/registry.py,sha256=w-QwvAPFlCrBYRAv4cXkp2zujQPZn8Fk5DUxKCtox8o,3430
|
|
9
10
|
comfy_env/resolver.py,sha256=WoNIo2IfTR2RlEf_HQl66eAeMa2R2pmLof_UdK-0RNE,6714
|
|
11
|
+
comfy_env/stub_imports.py,sha256=s84q8x5156ZkHNJhbuDqMhU_c-0ux51Rhe1aoVcGrj4,8920
|
|
10
12
|
comfy_env/env/__init__.py,sha256=imQdoQEQvrRT-QDtyNpFlkVbm2fBzgACdpQwRPd09fI,1157
|
|
11
|
-
comfy_env/env/config.py,sha256=
|
|
12
|
-
comfy_env/env/config_file.py,sha256=
|
|
13
|
+
comfy_env/env/config.py,sha256=cRSuWiVZGSK9xpvyNIyMirlHyfTm6_AB_eXzeKyvfnc,7749
|
|
14
|
+
comfy_env/env/config_file.py,sha256=g6fZq6XbTUXx97meWW_7xfKcuC0sN002c7fBvR0eCOg,24819
|
|
13
15
|
comfy_env/env/cuda_gpu_detection.py,sha256=YLuXUdWg6FeKdNyLlQAHPlveg4rTenXJ2VbeAaEi9QE,9755
|
|
14
16
|
comfy_env/env/manager.py,sha256=-qdbZDsbNfs70onVbC7mhKCzNsxYx3WmG7ttlBinhGI,23659
|
|
15
17
|
comfy_env/env/security.py,sha256=dNSitAnfBNVdvxgBBntYw33AJaCs_S1MHb7KJhAVYzM,8171
|
|
@@ -30,17 +32,17 @@ comfy_env/stubs/folder_paths.py,sha256=K90J34EG6LD4eZP8YG-xMeBmqwpp_wA8E92DKMXd1
|
|
|
30
32
|
comfy_env/stubs/comfy/__init__.py,sha256=-y4L6gX21vrI2V8MvNaMeHOcAn5kUNK3jUyLvtXRmJQ,173
|
|
31
33
|
comfy_env/stubs/comfy/model_management.py,sha256=Khx8Qa3NutKPLTn9oSM3VLeATUOg1fe4QCjxdxXd6eE,1462
|
|
32
34
|
comfy_env/stubs/comfy/utils.py,sha256=s3t_KLj_-w1Uj3A3iAy69wIk4Ggklojw5hsDNb69Pcc,776
|
|
33
|
-
comfy_env/templates/comfy-env-instructions.txt,sha256=
|
|
34
|
-
comfy_env/templates/comfy-env.toml,sha256=
|
|
35
|
+
comfy_env/templates/comfy-env-instructions.txt,sha256=Q38Hb_YdN0a8rTxn7l5ON4JDPba7XgVftDqfEy-8I2I,3004
|
|
36
|
+
comfy_env/templates/comfy-env.toml,sha256=v6nxvCWWKSlIpn4m-WqCkzJt4ObJsklbr9KBJt0r5fU,6729
|
|
35
37
|
comfy_env/workers/__init__.py,sha256=IKZwOvrWOGqBLDUIFAalg4CdqzJ_YnAdxo2Ha7gZTJ0,1467
|
|
36
38
|
comfy_env/workers/base.py,sha256=ZILYXlvGCWuCZXmjKqfG8VeD19ihdYaASdlbasl2BMo,2312
|
|
37
39
|
comfy_env/workers/pool.py,sha256=MtjeOWfvHSCockq8j1gfnxIl-t01GSB79T5N4YB82Lg,6956
|
|
38
40
|
comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaFLLq8,6409
|
|
39
41
|
comfy_env/workers/torch_mp.py,sha256=TnsCoBHEJBXEoBkx7WiCd9tBAlzFtMOw1dk_7_zGJZY,22288
|
|
40
|
-
comfy_env/workers/venv.py,sha256=
|
|
42
|
+
comfy_env/workers/venv.py,sha256=GFixbBMJkcjEkd8x1ry9mX13cR5mgUukQjIZjvK44ko,42381
|
|
41
43
|
comfy_env/wheel_sources.yml,sha256=uU0YJmWaiLAicQNN9VYS8PZevlP2NOH6mBUE294dvAo,8156
|
|
42
|
-
comfy_env-0.0.
|
|
43
|
-
comfy_env-0.0.
|
|
44
|
-
comfy_env-0.0.
|
|
45
|
-
comfy_env-0.0.
|
|
46
|
-
comfy_env-0.0.
|
|
44
|
+
comfy_env-0.0.50.dist-info/METADATA,sha256=HTNNXsxXnyr7JORwl0Ts3futX9xTrLEFstD3vpRepMc,8735
|
|
45
|
+
comfy_env-0.0.50.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
46
|
+
comfy_env-0.0.50.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
|
|
47
|
+
comfy_env-0.0.50.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
|
|
48
|
+
comfy_env-0.0.50.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|