comfy-env 0.0.46__py3-none-any.whl → 0.0.47__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/cli.py CHANGED
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.46
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,5 +1,5 @@
1
1
  comfy_env/__init__.py,sha256=OQJFNjmArjLcgrfHAFxgDJQFH_IhxibqMXbU5bu_j9Q,3822
2
- comfy_env/cli.py,sha256=hZv_oJsmaMoG62Fr2Fjp778P_32BHr4fzS7G4lULSwU,13153
2
+ comfy_env/cli.py,sha256=Pjzb-jsoH67lyHxmBFOWvasWX01eHFE_BEjUk1l-uEo,14509
3
3
  comfy_env/decorator.py,sha256=6JCKwLHaZtOLVDexs_gh_-NtS2ZK0V7nGCPqkyeYEAA,16688
4
4
  comfy_env/errors.py,sha256=8hN8NDlo8oBUdapc-eT3ZluigI5VBzfqsSBvQdfWlz4,9943
5
5
  comfy_env/install.py,sha256=m4NKlfCcQGI5xzVRjHw3ep-lWbqx5kE1e21sUUZ2Leo,17528
@@ -37,8 +37,8 @@ comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaF
37
37
  comfy_env/workers/torch_mp.py,sha256=4YSNPn7hALrvMVbkO4RkTeFTcc0lhfLMk5QTWjY4PHw,22134
38
38
  comfy_env/workers/venv.py,sha256=YXIjSo4JSq2m9W2sDXA6N0pBc8kv_MpxfOJ2YZjBkw4,38219
39
39
  comfy_env/wheel_sources.yml,sha256=K5dksy21YcT7QdFlVDkKF4Rv9ZCjHaWhQgoEhdSyAOI,8156
40
- comfy_env-0.0.46.dist-info/METADATA,sha256=IgAsssRTB2JzQG9g5H8By9YonDC34z5RT9uo_JBM5jY,7138
41
- comfy_env-0.0.46.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
42
- comfy_env-0.0.46.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
43
- comfy_env-0.0.46.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
44
- comfy_env-0.0.46.dist-info/RECORD,,
40
+ comfy_env-0.0.47.dist-info/METADATA,sha256=MzvGc3lpfr4Ct6ljtiCuFx7fdmLAUL8Jc8RbbEfmI_s,7138
41
+ comfy_env-0.0.47.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
42
+ comfy_env-0.0.47.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
43
+ comfy_env-0.0.47.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
44
+ comfy_env-0.0.47.dist-info/RECORD,,