comfy-env 0.0.75__py3-none-any.whl → 0.1.2__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/workers/mp.py CHANGED
@@ -64,14 +64,37 @@ def _worker_loop(queue_in, queue_out, sys_path_additions=None, lib_path=None):
64
64
  # Set worker mode env var
65
65
  os.environ["COMFYUI_ISOLATION_WORKER"] = "1"
66
66
 
67
- # Set LD_LIBRARY_PATH for conda libraries (must be done before imports)
68
- if lib_path:
69
- if sys.platform == "win32":
70
- # Windows: add to PATH for DLL loading
71
- os.environ["PATH"] = lib_path + ";" + os.environ.get("PATH", "")
72
- else:
73
- # Linux/Mac: LD_LIBRARY_PATH
74
- os.environ["LD_LIBRARY_PATH"] = lib_path + ":" + os.environ.get("LD_LIBRARY_PATH", "")
67
+ # DLL/library isolation - match SubprocessWorker's isolation level
68
+ # Filter out conflicting paths from conda/mamba/etc and use proper DLL registration
69
+ path_sep = ";" if sys.platform == "win32" else ":"
70
+
71
+ if sys.platform == "win32":
72
+ # Use os.add_dll_directory() for explicit DLL registration (Python 3.8+)
73
+ if lib_path and hasattr(os, "add_dll_directory"):
74
+ try:
75
+ os.add_dll_directory(lib_path)
76
+ except Exception:
77
+ pass
78
+
79
+ # Filter conflicting paths from PATH (matches subprocess.py:1203-1212)
80
+ current_path = os.environ.get("PATH", "")
81
+ clean_parts = [
82
+ p for p in current_path.split(path_sep)
83
+ if not any(x in p.lower() for x in (".ct-envs", "conda", "mamba", "miniforge", "miniconda", "anaconda", "mingw"))
84
+ ]
85
+ if lib_path:
86
+ clean_parts.insert(0, lib_path)
87
+ os.environ["PATH"] = path_sep.join(clean_parts)
88
+ else:
89
+ # Linux/Mac: Filter LD_LIBRARY_PATH with same patterns
90
+ current = os.environ.get("LD_LIBRARY_PATH", "")
91
+ clean_parts = [
92
+ p for p in current.split(path_sep) if p
93
+ and not any(x in p.lower() for x in (".ct-envs", "conda", "mamba", "miniforge", "miniconda", "anaconda"))
94
+ ]
95
+ if lib_path:
96
+ clean_parts.insert(0, lib_path)
97
+ os.environ["LD_LIBRARY_PATH"] = path_sep.join(clean_parts)
75
98
 
76
99
  # Find ComfyUI base and add to sys.path for real folder_paths/comfy modules
77
100
  # This works because comfy.options.args_parsing=False by default, so folder_paths
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.75
3
+ Version: 0.1.2
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
@@ -22,11 +22,11 @@ comfy_env/templates/comfy-env-instructions.txt,sha256=ve1RAthW7ouumU9h6DM7mIRX1M
22
22
  comfy_env/templates/comfy-env.toml,sha256=ROIqi4BlPL1MEdL1VgebfTHpdwPNYGHwWeigI9Kw-1I,4831
23
23
  comfy_env/workers/__init__.py,sha256=TMVG55d2XLP1mJ3x1d16H0SBDJZtk2kMC5P4HLk9TrA,1073
24
24
  comfy_env/workers/base.py,sha256=4ZYTaQ4J0kBHCoO_OfZnsowm4rJCoqinZUaOtgkOPbw,2307
25
- comfy_env/workers/mp.py,sha256=d6PFVrgqp3MK7Gkt08a8LQD_VSwHtoIcGx2Lovou3vM,25972
25
+ comfy_env/workers/mp.py,sha256=pn_1RNyPTCq-oE_pTHWuMMROCkY-cwQnAhezJraT9OI,27013
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.75.dist-info/METADATA,sha256=UoNQP1R_ddXCEFsPIpALxZp3wGBKKnj9xmJWU8guiis,6946
29
- comfy_env-0.0.75.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
30
- comfy_env-0.0.75.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
31
- comfy_env-0.0.75.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
32
- comfy_env-0.0.75.dist-info/RECORD,,
28
+ comfy_env-0.1.2.dist-info/METADATA,sha256=y9VJ1ErAv5lWCtTbruKtEwwc1bWd1xe7W-2txfKzyXM,6945
29
+ comfy_env-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
30
+ comfy_env-0.1.2.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
31
+ comfy_env-0.1.2.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
32
+ comfy_env-0.1.2.dist-info/RECORD,,