nexaai 1.0.21rc1__cp310-cp310-macosx_13_0_x86_64.whl → 1.0.21rc3__cp310-cp310-macosx_13_0_x86_64.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.

Potentially problematic release.


This version of nexaai might be problematic. Click here for more details.

Binary file
nexaai/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is generated by CMake from _version.py.in
2
2
  # Do not modify this file manually - it will be overwritten
3
3
 
4
- __version__ = "1.0.21-rc1"
4
+ __version__ = "1.0.21-rc3"
Binary file
Binary file
@@ -157,12 +157,16 @@ def create_gguf_manifest(repo_id: str, files: List[str], directory_path: str, ol
157
157
  # Use the new enum-based quantization extraction
158
158
  quantization_type = extract_quantization_from_filename(current_file_name)
159
159
  quant_level = quantization_type.value if quantization_type else "UNKNOWN"
160
-
161
- model_files[quant_level] = {
162
- "Name": current_file_name,
163
- "Downloaded": True,
164
- "Size": file_size
165
- }
160
+
161
+ # FIXME: hardcode to handle the multiple mmproj files problem
162
+ if quant_level == "UNKNOWN" and "mmproj" in current_file_name.lower():
163
+ pass
164
+ else:
165
+ model_files[quant_level] = {
166
+ "Name": current_file_name,
167
+ "Downloaded": True,
168
+ "Size": file_size
169
+ }
166
170
 
167
171
  # Determine PluginId with priority: kwargs > downloaded_manifest > model_file_type > default
168
172
  plugin_id = kwargs.get('plugin_id')
@@ -410,6 +410,20 @@ def _remove_specific_file(target_model: DownloadedModel, file_name: str, local_d
410
410
  except OSError:
411
411
  file_size = 0
412
412
 
413
+ # Check if we should remove entire folder instead (for .gguf files)
414
+ # If removing a .gguf file and no other non-mmproj .gguf files remain, remove entire folder
415
+ if file_name.endswith('.gguf'):
416
+ updated_files = [f for f in target_model.files if f != file_name]
417
+ # Find remaining .gguf files that don't contain "mmproj" in filename
418
+ remaining_non_mmproj_gguf = [
419
+ f for f in updated_files
420
+ if f.endswith('.gguf') and 'mmproj' not in f.lower()
421
+ ]
422
+
423
+ # If no non-mmproj .gguf files remain, remove entire repository
424
+ if len(remaining_non_mmproj_gguf) == 0:
425
+ return _remove_entire_repository(target_model, local_dir)
426
+
413
427
  # Remove the file
414
428
  try:
415
429
  os.remove(file_path)
@@ -846,6 +860,41 @@ class HuggingFaceDownloader:
846
860
  pass
847
861
  return {}
848
862
 
863
+ def _download_manifest_if_needed(self, repo_id: str, local_dir: str) -> bool:
864
+ """
865
+ Download nexa.manifest from the repository if it doesn't exist locally.
866
+
867
+ Args:
868
+ repo_id: Repository ID
869
+ local_dir: Local directory where the manifest should be saved
870
+
871
+ Returns:
872
+ bool: True if manifest was downloaded or already exists, False if not found in repo
873
+ """
874
+ manifest_path = os.path.join(local_dir, 'nexa.manifest')
875
+
876
+ # Check if manifest already exists locally
877
+ if os.path.exists(manifest_path):
878
+ return True
879
+
880
+ # Try to download nexa.manifest from the repository
881
+ try:
882
+ print(f"[INFO] Attempting to download nexa.manifest from {repo_id}...")
883
+ self.api.hf_hub_download(
884
+ repo_id=repo_id,
885
+ filename='nexa.manifest',
886
+ local_dir=local_dir,
887
+ local_dir_use_symlinks=False,
888
+ token=self.token,
889
+ force_download=False
890
+ )
891
+ print(f"[OK] Successfully downloaded nexa.manifest from {repo_id}")
892
+ return True
893
+ except Exception as e:
894
+ # Manifest doesn't exist in repo or other error - this is fine, we'll create it
895
+ print(f"[INFO] nexa.manifest not found in {repo_id}, will create locally")
896
+ return False
897
+
849
898
  def _fetch_and_save_metadata(self, repo_id: str, local_dir: str, is_mmproj: bool = False, file_name: Optional[Union[str, List[str]]] = None, **kwargs) -> None:
850
899
  """Fetch model info and save metadata after successful download."""
851
900
  # Initialize metadata with defaults to ensure manifest is always created
@@ -946,6 +995,9 @@ class HuggingFaceDownloader:
946
995
  if progress_tracker:
947
996
  progress_tracker.stop_tracking()
948
997
 
998
+ # Download nexa.manifest from repo if it doesn't exist locally
999
+ self._download_manifest_if_needed(repo_id, file_local_dir)
1000
+
949
1001
  # Save metadata after successful download
950
1002
  self._fetch_and_save_metadata(repo_id, file_local_dir, self._current_is_mmproj, self._current_file_name, **kwargs)
951
1003
 
@@ -1055,6 +1107,9 @@ class HuggingFaceDownloader:
1055
1107
  if progress_tracker:
1056
1108
  progress_tracker.stop_tracking()
1057
1109
 
1110
+ # Download nexa.manifest from repo if it doesn't exist locally
1111
+ self._download_manifest_if_needed(repo_id, repo_local_dir)
1112
+
1058
1113
  # Save metadata after successful download
1059
1114
  self._fetch_and_save_metadata(repo_id, repo_local_dir, self._current_is_mmproj, self._current_file_name, **kwargs)
1060
1115
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nexaai
3
- Version: 1.0.21rc1
3
+ Version: 1.0.21rc3
4
4
  Summary: Python bindings for NexaSDK C-lib backend
5
5
  Author-email: "Nexa AI, Inc." <dev@nexa.ai>
6
6
  Project-URL: Homepage, https://github.com/NexaAI/nexasdk-bridge
@@ -1,6 +1,6 @@
1
1
  nexaai/__init__.py,sha256=gOd7sNsqEESopw_24xgnOSkIRENrk4Fa-RMtmVv62eA,2421
2
- nexaai/_stub.cpython-310-darwin.so,sha256=rI0M16HWShk2bDzCG8uQ9eIeff8R2JWwad7VLm68_JY,49832
3
- nexaai/_version.py,sha256=sVSvlzCHN_LFLOFxO9UEdPfKi2BBoPi4MtOW-fdz1i8,143
2
+ nexaai/_stub.cpython-310-darwin.so,sha256=Fq120D6EAfyqOVGqiBYtkRSy6ATsXZ1G3ZzyVSV0zdo,49832
3
+ nexaai/_version.py,sha256=ID_IZAM6M09cuL9CYn_AdeRURy3aD3cA9rhpbKtIWc4,143
4
4
  nexaai/asr.py,sha256=NljMXDErwPNMOPaRkJZMEDka9Nk8xyur7L8i924TStY,2054
5
5
  nexaai/base.py,sha256=N8PRgDFA-XPku2vWnQIofQ7ipz3pPlO6f8YZGnuhquE,982
6
6
  nexaai/common.py,sha256=Y0NJNLTi4Nq4x1WL6PQsSvGUto0eGmWhjpsC6jcekfA,3444
@@ -20,7 +20,7 @@ nexaai/asr_impl/pybind_asr_impl.py,sha256=pE9Hb_hMi5yAc4MF83bLVOb8zDtreCkB3_u7XE
20
20
  nexaai/binds/__init__.py,sha256=eYuay_8DDXeOUWz2_R9HFSabohxs6hvZn391t2L0Po0,104
21
21
  nexaai/binds/common_bind.cpython-310-darwin.so,sha256=BoXByRlNGDaNS1YyZyCF-s7h0vXP9NLPlJMQQ5pqusU,235488
22
22
  nexaai/binds/embedder_bind.cpython-310-darwin.so,sha256=b2NoXFAJvPLi_P1X7lXLKmAUU0v2HJI3Zwa10gfqHdw,202032
23
- nexaai/binds/libnexa_bridge.dylib,sha256=jnHOOuy-Kvt-5G40HQk_NJxFncsTxPZDHETQoJHpmJQ,271952
23
+ nexaai/binds/libnexa_bridge.dylib,sha256=XOxuzeDJ9ZhMJLFg5xpdEJNkI0XCn1wVf64khprD0xk,271952
24
24
  nexaai/binds/llm_bind.cpython-310-darwin.so,sha256=p1ZTGMolEkWywkmwzOUjTr3RpSEH21BHZAggVzo89Ks,183088
25
25
  nexaai/binds/vlm_bind.cpython-310-darwin.so,sha256=CQdy70sGqhM9SvoDN3xmsOj79IWEYeOVhwou_kgkjHI,199392
26
26
  nexaai/binds/cpu_gpu/libggml-base.dylib,sha256=YDclLDlP7XlDpXiKfTOTt6mW7jgXlmwSoT_VuRrGrmM,629528
@@ -29,7 +29,7 @@ nexaai/binds/cpu_gpu/libggml-metal.so,sha256=Xhhl_tLg1xmCIQVrKjqPFaLHAlx_2wUFiwD
29
29
  nexaai/binds/cpu_gpu/libggml.dylib,sha256=12Q1Z98oM81hxzT_GMQsW5rlhC8DOMsX6luWVCFQHcI,58336
30
30
  nexaai/binds/cpu_gpu/libmtmd.dylib,sha256=4-KGS82gxwwIJBNHuZ88mzzTbNZ12tqsDD46-ey6sQ4,701504
31
31
  nexaai/binds/cpu_gpu/libnexa_cpu_gpu.dylib,sha256=9qrrMOlGWM9cWUORg64GfkE_p9aQ1rjIp_z-QVfIFH8,1982280
32
- nexaai/binds/cpu_gpu/libnexa_plugin.dylib,sha256=OaGyG0gi0PCsJ-2pP1WZJUrgo2D_NCGI845MFc6hQ7M,2043144
32
+ nexaai/binds/cpu_gpu/libnexa_plugin.dylib,sha256=KGYMUsAyrBuNWJVvZQQMSRGkb1lKdps4AXNuf4Vkfa0,2063984
33
33
  nexaai/cv_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  nexaai/cv_impl/mlx_cv_impl.py,sha256=gKECQOv8iaWwG3bl7xeqVy2NN_9K7tYerIFzfn4eLo4,3228
35
35
  nexaai/cv_impl/pybind_cv_impl.py,sha256=uSmwBste4cT7c8DQmXzRLmzwDf773PAbXNYWW1UzVls,1064
@@ -391,15 +391,15 @@ nexaai/tts_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
391
391
  nexaai/tts_impl/mlx_tts_impl.py,sha256=i_uNPdvlXYtL3e01oKjDlP9jgkWCRt1bBHsExaaiJi8,3101
392
392
  nexaai/tts_impl/pybind_tts_impl.py,sha256=mpn44r6pfYLIl-NrEy2dXHjGtWtNCmM7HRyxiANxUI4,1444
393
393
  nexaai/utils/decode.py,sha256=61n4Zf6c5QLyqGoctEitlI9BX3tPlP2a5aaKNHbw3T4,404
394
- nexaai/utils/manifest_utils.py,sha256=SCcFN09xNI0DiTA1U7DZwWiQsRH0CInWSny_9q0BwNM,21273
395
- nexaai/utils/model_manager.py,sha256=NnbPv1iuwo6T523gLsWjnff-gGvPGUjez-rFg8-ffpE,59568
394
+ nexaai/utils/manifest_utils.py,sha256=OOp_BmFWH1ZHMYkS2VGAby5Rpm4f4GLCRBJEBYm-kys,21489
395
+ nexaai/utils/model_manager.py,sha256=CsRflxY329DgDeZxl_PGFKis7MQW7XROkrvZUCPEpvo,62022
396
396
  nexaai/utils/model_types.py,sha256=ONWjjo8CFPdhxki6qo7MXnSZaEzjBcxa_Kkf_y5NXus,1483
397
397
  nexaai/utils/progress_tracker.py,sha256=jdUqtmPqyhwC9uSKvQcJEYETwSt-OhP4oitdJ94614o,15394
398
398
  nexaai/utils/quantization_utils.py,sha256=FYcNSAKGlBqFDUTx3jSKOr2lnq4nyiyC0ZG8oSxFwiU,7825
399
399
  nexaai/vlm_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
400
400
  nexaai/vlm_impl/mlx_vlm_impl.py,sha256=sgHqnX5OCSGLccCnTuRiktIbqThNn3AAIvYE2_Dy4TI,10833
401
401
  nexaai/vlm_impl/pybind_vlm_impl.py,sha256=MDbreWSqugakXU_PqH6mPoCxjKEEbYfQIco_NDck8_s,9905
402
- nexaai-1.0.21rc1.dist-info/METADATA,sha256=I2YizqGmn9LBQh1tfAPNxPZYE_limQe4ELxBlzYqtKM,1209
403
- nexaai-1.0.21rc1.dist-info/WHEEL,sha256=0KYp5feZ1CMUhsfFXKpSQTbSmQbXy4mv6yPPVBXg2EM,110
404
- nexaai-1.0.21rc1.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
405
- nexaai-1.0.21rc1.dist-info/RECORD,,
402
+ nexaai-1.0.21rc3.dist-info/METADATA,sha256=Z60_QaLnVyCkagft_DciM2-tu21NNlw6Z_5P7ukQaDw,1209
403
+ nexaai-1.0.21rc3.dist-info/WHEEL,sha256=0KYp5feZ1CMUhsfFXKpSQTbSmQbXy4mv6yPPVBXg2EM,110
404
+ nexaai-1.0.21rc3.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
405
+ nexaai-1.0.21rc3.dist-info/RECORD,,