comfy-env 0.1.5__py3-none-any.whl → 0.1.6__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
@@ -40,8 +40,8 @@ _SHUTDOWN = object()
40
40
  _CALL_METHOD = "call_method"
41
41
 
42
42
 
43
- def _dump_worker_env(worker_name: str = "unknown"):
44
- """Dump worker environment to .comfy-env/logs/ for debugging."""
43
+ def _dump_worker_env(worker_name: str = "unknown", print_to_terminal: bool = False):
44
+ """Dump worker environment to .comfy-env/logs/ (always) and optionally print."""
45
45
  import json
46
46
  import os
47
47
  import platform
@@ -74,7 +74,18 @@ def _dump_worker_env(worker_name: str = "unknown"):
74
74
 
75
75
  log_file = log_dir / f"worker_{worker_name}_{os.getpid()}.json"
76
76
  log_file.write_text(json.dumps(debug_info, indent=2, default=str))
77
- print(f"[comfy-env] Worker env dumped to: {log_file}")
77
+
78
+ if print_to_terminal:
79
+ print(f"[comfy-env] === WORKER ENV DEBUG: {worker_name} ===")
80
+ print(f"[comfy-env] Python: {sys.executable}")
81
+ print(f"[comfy-env] Version: {sys.version.split()[0]}")
82
+ print(f"[comfy-env] PID: {os.getpid()}, CWD: {os.getcwd()}")
83
+ for var in ['PATH', 'LD_LIBRARY_PATH', 'PYTHONPATH', 'OMP_NUM_THREADS', 'KMP_DUPLICATE_LIB_OK']:
84
+ val = os.environ.get(var, '<unset>')
85
+ if len(val) > 100:
86
+ val = val[:100] + '...'
87
+ print(f"[comfy-env] {var}={val}")
88
+ print(f"[comfy-env] Env dumped to: {log_file}")
78
89
 
79
90
 
80
91
  def _worker_loop(queue_in, queue_out, sys_path_additions=None, lib_path=None, env_vars=None, worker_name=None):
@@ -107,9 +118,9 @@ def _worker_loop(queue_in, queue_out, sys_path_additions=None, lib_path=None, en
107
118
  # Set worker mode env var
108
119
  os.environ["COMFYUI_ISOLATION_WORKER"] = "1"
109
120
 
110
- # Debug logging if enabled
111
- if os.environ.get("COMFY_ENV_DEBUG", "").lower() in ("1", "true", "yes"):
112
- _dump_worker_env(worker_name or "unknown")
121
+ # Always dump env to file, print to terminal if debug enabled
122
+ print_debug = os.environ.get("COMFY_ENV_DEBUG", "").lower() in ("1", "true", "yes")
123
+ _dump_worker_env(worker_name or "unknown", print_to_terminal=print_debug)
113
124
 
114
125
  # DLL/library isolation - match SubprocessWorker's isolation level
115
126
  # Filter out conflicting paths from conda/mamba/etc and use proper DLL registration
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.1.5
3
+ Version: 0.1.6
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=_YTedupySLlOjuRDuJVluHGc0bBrhXyYnDbhztWBab0,28829
25
+ comfy_env/workers/mp.py,sha256=xqSLnpR5zSVdZKt10nM6LmNyJ2SmlSr1yQ5I9HX5OJ4,29514
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.1.5.dist-info/METADATA,sha256=EKrB75ktH9g4aq-dkrxvoVd-YwGwcf3XAjeqYxOiPCE,6945
29
- comfy_env-0.1.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
30
- comfy_env-0.1.5.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
31
- comfy_env-0.1.5.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
32
- comfy_env-0.1.5.dist-info/RECORD,,
28
+ comfy_env-0.1.6.dist-info/METADATA,sha256=IT7HN3q_Q7hdsZqcGRbgtoeKBTN6z_1Gzr8KhVtPpg0,6945
29
+ comfy_env-0.1.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
30
+ comfy_env-0.1.6.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
31
+ comfy_env-0.1.6.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
32
+ comfy_env-0.1.6.dist-info/RECORD,,