comfy-env 0.1.17__tar.gz → 0.1.18__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.17 → comfy_env-0.1.18}/PKG-INFO +1 -1
- {comfy_env-0.1.17 → comfy_env-0.1.18}/pyproject.toml +1 -1
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/isolation/workers/subprocess.py +28 -25
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/packages/__init__.py +0 -2
- {comfy_env-0.1.17 → comfy_env-0.1.18}/.github/workflows/ci.yml +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/.github/workflows/publish.yml +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/.gitignore +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/LICENSE +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/README.md +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/__init__.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/cli.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/config/__init__.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/config/parser.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/config/types.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/detection/__init__.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/detection/cuda.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/detection/gpu.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/detection/platform.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/detection/runtime.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/environment/__init__.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/environment/cache.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/environment/libomp.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/environment/paths.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/environment/setup.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/install.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/isolation/__init__.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/isolation/tensor_utils.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/isolation/workers/__init__.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/isolation/workers/base.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/isolation/workers/mp.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/isolation/wrap.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/packages/apt.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/packages/cuda_wheels.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/packages/node_dependencies.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/packages/pixi.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/packages/toml_generator.py +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/src/comfy_env/templates/comfy-env-instructions.txt +0 -0
- {comfy_env-0.1.17 → comfy_env-0.1.18}/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.18
|
|
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
|
|
@@ -193,6 +193,32 @@ from multiprocessing import shared_memory as shm
|
|
|
193
193
|
import numpy as np
|
|
194
194
|
|
|
195
195
|
|
|
196
|
+
def _prepare_trimesh_for_pickle(mesh):
|
|
197
|
+
"""
|
|
198
|
+
Prepare a trimesh object for cross-Python-version pickling.
|
|
199
|
+
|
|
200
|
+
Trimesh attaches helper objects (ray tracer, proximity query) that may use
|
|
201
|
+
native extensions like embreex. These cause import errors when unpickling
|
|
202
|
+
on a system without those extensions. We strip them - they'll be recreated
|
|
203
|
+
lazily when needed.
|
|
204
|
+
|
|
205
|
+
Note: Do NOT strip _cache - trimesh needs it to function properly.
|
|
206
|
+
"""
|
|
207
|
+
# Make a copy to avoid modifying the original
|
|
208
|
+
mesh = mesh.copy()
|
|
209
|
+
|
|
210
|
+
# Remove helper objects that may have unpickleable native code references
|
|
211
|
+
# These are lazily recreated on first access anyway
|
|
212
|
+
# Do NOT remove _cache - it's needed for trimesh to work
|
|
213
|
+
for attr in ('ray', '_ray', 'permutate', 'nearest'):
|
|
214
|
+
try:
|
|
215
|
+
delattr(mesh, attr)
|
|
216
|
+
except AttributeError:
|
|
217
|
+
pass
|
|
218
|
+
|
|
219
|
+
return mesh
|
|
220
|
+
|
|
221
|
+
|
|
196
222
|
def _to_shm(obj, registry, visited=None):
|
|
197
223
|
"""
|
|
198
224
|
Serialize object to shared memory. Returns JSON-safe metadata.
|
|
@@ -231,6 +257,7 @@ def _to_shm(obj, registry, visited=None):
|
|
|
231
257
|
# trimesh.Trimesh -> pickle -> shared memory (preserves visual, metadata, normals)
|
|
232
258
|
if t == 'Trimesh':
|
|
233
259
|
import pickle
|
|
260
|
+
obj = _prepare_trimesh_for_pickle(obj)
|
|
234
261
|
mesh_bytes = pickle.dumps(obj)
|
|
235
262
|
|
|
236
263
|
block = shm.SharedMemory(create=True, size=len(mesh_bytes))
|
|
@@ -533,6 +560,7 @@ def _to_shm(obj, registry, visited=None):
|
|
|
533
560
|
# trimesh.Trimesh -> pickle -> shared memory (preserves visual, metadata, normals)
|
|
534
561
|
if t == 'Trimesh':
|
|
535
562
|
import pickle
|
|
563
|
+
obj = _prepare_trimesh_for_pickle(obj)
|
|
536
564
|
mesh_bytes = pickle.dumps(obj)
|
|
537
565
|
|
|
538
566
|
block = shm.SharedMemory(create=True, size=len(mesh_bytes))
|
|
@@ -642,31 +670,6 @@ def _should_use_reference(obj):
|
|
|
642
670
|
# Everything else (custom classes) - pass by reference
|
|
643
671
|
return True
|
|
644
672
|
|
|
645
|
-
def _prepare_trimesh_for_pickle(mesh):
|
|
646
|
-
"""
|
|
647
|
-
Prepare a trimesh object for cross-Python-version pickling.
|
|
648
|
-
|
|
649
|
-
Trimesh attaches helper objects (ray tracer, proximity query) that may use
|
|
650
|
-
native extensions like embreex. These cause import errors when unpickling
|
|
651
|
-
on a system without those extensions. We strip them - they'll be recreated
|
|
652
|
-
lazily when needed.
|
|
653
|
-
|
|
654
|
-
Note: Do NOT strip _cache - trimesh needs it to function properly.
|
|
655
|
-
"""
|
|
656
|
-
# Make a copy to avoid modifying the original
|
|
657
|
-
mesh = mesh.copy()
|
|
658
|
-
|
|
659
|
-
# Remove helper objects that may have unpickleable native code references
|
|
660
|
-
# These are lazily recreated on first access anyway
|
|
661
|
-
# Do NOT remove _cache - it's needed for trimesh to work
|
|
662
|
-
for attr in ('ray', '_ray', 'permutate', 'nearest'):
|
|
663
|
-
try:
|
|
664
|
-
delattr(mesh, attr)
|
|
665
|
-
except AttributeError:
|
|
666
|
-
pass
|
|
667
|
-
|
|
668
|
-
return mesh
|
|
669
|
-
|
|
670
673
|
|
|
671
674
|
def _serialize_result(obj, visited=None):
|
|
672
675
|
"""Convert result for IPC - complex objects become references."""
|
|
@@ -5,7 +5,6 @@ Handles pixi, CUDA wheels, apt packages, and node dependencies.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from .pixi import (
|
|
8
|
-
PIXI_VERSION,
|
|
9
8
|
ensure_pixi,
|
|
10
9
|
get_pixi_path,
|
|
11
10
|
get_pixi_python,
|
|
@@ -35,7 +34,6 @@ from .node_dependencies import (
|
|
|
35
34
|
|
|
36
35
|
__all__ = [
|
|
37
36
|
# Pixi package manager
|
|
38
|
-
"PIXI_VERSION",
|
|
39
37
|
"ensure_pixi",
|
|
40
38
|
"get_pixi_path",
|
|
41
39
|
"get_pixi_python",
|
|
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
|