comfy-env 0.0.45__tar.gz → 0.0.47__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.
Files changed (45) hide show
  1. {comfy_env-0.0.45 → comfy_env-0.0.47}/PKG-INFO +1 -1
  2. {comfy_env-0.0.45 → comfy_env-0.0.47}/pyproject.toml +1 -1
  3. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/cli.py +51 -1
  4. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/pixi.py +21 -1
  5. {comfy_env-0.0.45 → comfy_env-0.0.47}/.github/workflows/publish.yml +0 -0
  6. {comfy_env-0.0.45 → comfy_env-0.0.47}/.gitignore +0 -0
  7. {comfy_env-0.0.45 → comfy_env-0.0.47}/LICENSE +0 -0
  8. {comfy_env-0.0.45 → comfy_env-0.0.47}/README.md +0 -0
  9. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/__init__.py +0 -0
  10. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/decorator.py +0 -0
  11. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/__init__.py +0 -0
  12. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/config.py +0 -0
  13. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/config_file.py +0 -0
  14. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/cuda_gpu_detection.py +0 -0
  15. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/manager.py +0 -0
  16. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/platform/__init__.py +0 -0
  17. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/platform/base.py +0 -0
  18. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/platform/darwin.py +0 -0
  19. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/platform/linux.py +0 -0
  20. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/platform/windows.py +0 -0
  21. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/env/security.py +0 -0
  22. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/errors.py +0 -0
  23. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/install.py +0 -0
  24. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/ipc/__init__.py +0 -0
  25. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/ipc/bridge.py +0 -0
  26. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/ipc/protocol.py +0 -0
  27. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/ipc/tensor.py +0 -0
  28. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/ipc/torch_bridge.py +0 -0
  29. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/ipc/transport.py +0 -0
  30. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/ipc/worker.py +0 -0
  31. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/nodes.py +0 -0
  32. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/registry.py +0 -0
  33. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/resolver.py +0 -0
  34. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/stubs/__init__.py +0 -0
  35. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/stubs/comfy/__init__.py +0 -0
  36. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/stubs/comfy/model_management.py +0 -0
  37. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/stubs/comfy/utils.py +0 -0
  38. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/stubs/folder_paths.py +0 -0
  39. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/wheel_sources.yml +0 -0
  40. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/workers/__init__.py +0 -0
  41. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/workers/base.py +0 -0
  42. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/workers/pool.py +0 -0
  43. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/workers/tensor_utils.py +0 -0
  44. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/workers/torch_mp.py +0 -0
  45. {comfy_env-0.0.45 → comfy_env-0.0.47}/src/comfy_env/workers/venv.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.45
3
+ Version: 0.0.47
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,6 +1,6 @@
1
1
  [project]
2
2
  name = "comfy-env"
3
- version = "0.0.45"
3
+ version = "0.0.47"
4
4
  description = "Environment management for ComfyUI custom nodes - CUDA wheel resolution and process isolation"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -42,6 +42,18 @@ def main(args: Optional[List[str]] = None) -> int:
42
42
 
43
43
  subparsers = parser.add_subparsers(dest="command", help="Available commands")
44
44
 
45
+ # init command
46
+ init_parser = subparsers.add_parser(
47
+ "init",
48
+ help="Create a default comfy-env.toml config file",
49
+ description="Initialize a new comfy-env.toml configuration file in the current directory",
50
+ )
51
+ init_parser.add_argument(
52
+ "--force", "-f",
53
+ action="store_true",
54
+ help="Overwrite existing config file",
55
+ )
56
+
45
57
  # install command
46
58
  install_parser = subparsers.add_parser(
47
59
  "install",
@@ -134,7 +146,9 @@ def main(args: Optional[List[str]] = None) -> int:
134
146
  return 0
135
147
 
136
148
  try:
137
- if parsed.command == "install":
149
+ if parsed.command == "init":
150
+ return cmd_init(parsed)
151
+ elif parsed.command == "install":
138
152
  return cmd_install(parsed)
139
153
  elif parsed.command == "info":
140
154
  return cmd_info(parsed)
@@ -155,6 +169,42 @@ def main(args: Optional[List[str]] = None) -> int:
155
169
  return 1
156
170
 
157
171
 
172
+ DEFAULT_CONFIG = """\
173
+ # comfy-env.toml - Environment configuration for ComfyUI custom nodes
174
+ # Documentation: https://github.com/PozzettiAndrea/comfy-env
175
+
176
+ [system]
177
+ # System packages required (apt on Linux, brew on macOS)
178
+ linux = []
179
+
180
+ [environment]
181
+ python = "3.11"
182
+ cuda_version = "auto"
183
+ pytorch_version = "auto"
184
+
185
+ [environment.cuda]
186
+ # CUDA packages from comfy-env registry
187
+ # Example: nvdiffrast = "0.4.0"
188
+
189
+ [environment.packages]
190
+ requirements = []
191
+ """
192
+
193
+
194
+ def cmd_init(args) -> int:
195
+ """Handle init command."""
196
+ config_path = Path.cwd() / "comfy-env.toml"
197
+
198
+ if config_path.exists() and not args.force:
199
+ print(f"Config file already exists: {config_path}", file=sys.stderr)
200
+ print("Use --force to overwrite", file=sys.stderr)
201
+ return 1
202
+
203
+ config_path.write_text(DEFAULT_CONFIG)
204
+ print(f"Created {config_path}")
205
+ return 0
206
+
207
+
158
208
  def cmd_install(args) -> int:
159
209
  """Handle install command."""
160
210
  from .install import install
@@ -224,6 +224,21 @@ def create_pixi_toml(
224
224
 
225
225
  # PyPI dependencies section
226
226
  pypi_deps = []
227
+ special_deps = {} # For dependencies that need special syntax (path, etc.)
228
+
229
+ # Always include comfy-env for worker support
230
+ # Use local wheel if available (for ct test --local)
231
+ local_wheels_dir = os.environ.get("COMFY_LOCAL_WHEELS")
232
+ if local_wheels_dir:
233
+ local_wheels = list(Path(local_wheels_dir).glob("comfy_env-*.whl"))
234
+ if local_wheels:
235
+ # Use relative path from node_dir
236
+ rel_path = os.path.relpath(local_wheels[0], node_dir)
237
+ special_deps["comfy-env"] = f'{{ path = "{rel_path}" }}'
238
+ else:
239
+ pypi_deps.append("comfy-env")
240
+ else:
241
+ pypi_deps.append("comfy-env")
227
242
 
228
243
  # Add regular requirements
229
244
  if env_config.requirements:
@@ -241,8 +256,13 @@ def create_pixi_toml(
241
256
  elif sys.platform == "win32" and env_config.windows_requirements:
242
257
  pypi_deps.extend(env_config.windows_requirements)
243
258
 
244
- if pypi_deps:
259
+ if pypi_deps or special_deps:
245
260
  lines.append("[pypi-dependencies]")
261
+
262
+ # Add special dependencies first (path-based, etc.)
263
+ for name, value in special_deps.items():
264
+ lines.append(f'{name} = {value}')
265
+
246
266
  for dep in pypi_deps:
247
267
  # Parse pip requirement format to pixi format
248
268
  dep_clean = dep.strip()
File without changes
File without changes
File without changes