comfy-env 0.0.52__py3-none-any.whl → 0.0.53__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/pixi.py CHANGED
@@ -203,10 +203,12 @@ def create_pixi_toml(
203
203
  Returns:
204
204
  Path to the generated pixi.toml file.
205
205
  """
206
- if not env_config.conda:
207
- raise ValueError("Environment has no conda configuration")
208
-
209
- conda = env_config.conda
206
+ # Conda is optional - use defaults if not present
207
+ if env_config.conda:
208
+ conda = env_config.conda
209
+ else:
210
+ from comfy_env.env.config import CondaConfig
211
+ conda = CondaConfig(channels=["conda-forge"], packages=[])
210
212
  pixi_toml_path = node_dir / "pixi.toml"
211
213
 
212
214
  # Build pixi.toml content
@@ -375,6 +377,34 @@ def create_pixi_toml(
375
377
  lines.append(f'{name} = {value}')
376
378
 
377
379
  for dep in pypi_deps:
380
+ # Handle git dependencies in two formats:
381
+ # 1. pkg @ git+https://github.com/user/repo.git@commit
382
+ # 2. git+https://github.com/user/repo.git@commit (extract name from URL)
383
+ if "git+" in dep:
384
+ if " @ git+" in dep:
385
+ # Format: pkg @ git+URL@commit
386
+ match = re.match(r'^([a-zA-Z0-9._-]+)\s*@\s*git\+(.+?)(?:@([a-f0-9]+))?$', dep)
387
+ if match:
388
+ pkg_name = match.group(1)
389
+ git_url = match.group(2)
390
+ rev = match.group(3)
391
+ else:
392
+ # Format: git+URL@commit (extract package name from repo name)
393
+ match = re.match(r'^git\+(.+?)(?:@([a-f0-9]+))?$', dep)
394
+ if match:
395
+ git_url = match.group(1)
396
+ rev = match.group(2)
397
+ # Extract package name from URL (repo name without .git)
398
+ repo_match = re.search(r'/([^/]+?)(?:\.git)?$', git_url)
399
+ pkg_name = repo_match.group(1) if repo_match else git_url.split('/')[-1].replace('.git', '')
400
+
401
+ if match:
402
+ if rev:
403
+ lines.append(f'{pkg_name} = {{ git = "{git_url}", rev = "{rev}" }}')
404
+ else:
405
+ lines.append(f'{pkg_name} = {{ git = "{git_url}" }}')
406
+ continue
407
+
378
408
  # Parse pip requirement format to pixi format
379
409
  # Handles extras like trimesh[easy]>=4.0.0
380
410
  name, version_spec, extras = _parse_pypi_requirement(dep)
comfy_env/workers/venv.py CHANGED
@@ -671,8 +671,12 @@ def _should_use_reference(obj):
671
671
  # Primitives - pass by value
672
672
  if isinstance(obj, (bool, int, float, str, bytes)):
673
673
  return False
674
- # NumPy arrays and torch tensors - pass by value (they serialize well)
674
+ # NumPy scalars - pass by value (convert to Python primitives)
675
675
  obj_type = type(obj).__name__
676
+ if obj_type in ('float16', 'float32', 'float64', 'int8', 'int16', 'int32', 'int64',
677
+ 'uint8', 'uint16', 'uint32', 'uint64', 'bool_'):
678
+ return False
679
+ # NumPy arrays and torch tensors - pass by value (they serialize well)
676
680
  if obj_type in ('ndarray', 'Tensor'):
677
681
  return False
678
682
  # Dicts, lists, tuples - recurse into contents (don't ref the container)
@@ -705,6 +709,16 @@ def _serialize_result(obj, visited=None):
705
709
  return [_serialize_result(v, visited) for v in obj]
706
710
  if isinstance(obj, tuple):
707
711
  return tuple(_serialize_result(v, visited) for v in obj)
712
+
713
+ # Convert numpy scalars to Python primitives for JSON serialization
714
+ obj_type = type(obj).__name__
715
+ if obj_type in ('float16', 'float32', 'float64'):
716
+ return float(obj)
717
+ if obj_type in ('int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64'):
718
+ return int(obj)
719
+ if obj_type == 'bool_':
720
+ return bool(obj)
721
+
708
722
  return obj
709
723
 
710
724
  def _deserialize_input(obj):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.52
3
+ Version: 0.0.53
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
@@ -5,7 +5,7 @@ comfy_env/errors.py,sha256=8hN8NDlo8oBUdapc-eT3ZluigI5VBzfqsSBvQdfWlz4,9943
5
5
  comfy_env/install.py,sha256=b2eXFqQ58pUBWpwc1AhymbTh7dGRMnEuq5FoZot0CO0,15661
6
6
  comfy_env/isolation.py,sha256=wuze8TmkRbdMfrg2cj9quoGYJWsxKcc5iiDvmLWX16g,8680
7
7
  comfy_env/nodes.py,sha256=CWUe35jU5SKk4ur-SddZePdqWgxJDlxGhpcJiu5pAK4,4354
8
- comfy_env/pixi.py,sha256=qycJVCwtxxG5a9w3TGiRX3sw_GcEsIiDEy9hu_H7loU,19765
8
+ comfy_env/pixi.py,sha256=7_ylvBlVouwHZTraNXrS8bqfksdEpOOxhFus0HgVKVw,21375
9
9
  comfy_env/registry.py,sha256=w-QwvAPFlCrBYRAv4cXkp2zujQPZn8Fk5DUxKCtox8o,3430
10
10
  comfy_env/resolver.py,sha256=WoNIo2IfTR2RlEf_HQl66eAeMa2R2pmLof_UdK-0RNE,6714
11
11
  comfy_env/stub_imports.py,sha256=9aSWkgDHU0GjqQ8BmUMJyKewc47OtlbWPbAYY0gkCrM,9274
@@ -39,10 +39,10 @@ comfy_env/workers/base.py,sha256=ZILYXlvGCWuCZXmjKqfG8VeD19ihdYaASdlbasl2BMo,231
39
39
  comfy_env/workers/pool.py,sha256=MtjeOWfvHSCockq8j1gfnxIl-t01GSB79T5N4YB82Lg,6956
40
40
  comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaFLLq8,6409
41
41
  comfy_env/workers/torch_mp.py,sha256=TnsCoBHEJBXEoBkx7WiCd9tBAlzFtMOw1dk_7_zGJZY,22288
42
- comfy_env/workers/venv.py,sha256=IFeMaOyxTW3RXfc71Q1i_JhfE7ZBbTGm18Rr_KLI1cE,49606
42
+ comfy_env/workers/venv.py,sha256=MVAzO4lFsDdPAzF9-jhD9Pq9pEo6VRDnbMjlv6ymHfc,50225
43
43
  comfy_env/wheel_sources.yml,sha256=uU0YJmWaiLAicQNN9VYS8PZevlP2NOH6mBUE294dvAo,8156
44
- comfy_env-0.0.52.dist-info/METADATA,sha256=afUGkDhRWskd-PWfDjXCHUUCqoMJNE9933-EV7JyDOg,8735
45
- comfy_env-0.0.52.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
46
- comfy_env-0.0.52.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
47
- comfy_env-0.0.52.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
48
- comfy_env-0.0.52.dist-info/RECORD,,
44
+ comfy_env-0.0.53.dist-info/METADATA,sha256=5XDAtBTqQpuePUVVUtzTx151XO1VAevd9TusF0xhTUo,8735
45
+ comfy_env-0.0.53.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
46
+ comfy_env-0.0.53.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
47
+ comfy_env-0.0.53.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
48
+ comfy_env-0.0.53.dist-info/RECORD,,