keras-hub-nightly 0.23.0.dev202510150419__py3-none-any.whl → 0.23.0.dev202510170417__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.

Potentially problematic release.


This version of keras-hub-nightly might be problematic. Click here for more details.

@@ -245,6 +245,12 @@ class ReversibleEmbedding(keras.layers.Embedding):
245
245
  inputs, axis=axis, to_numpy=True
246
246
  )
247
247
 
248
+ if mode != "int8":
249
+ raise NotImplementedError(
250
+ "Invalid quantization mode. Expected 'int8'. "
251
+ f"Received: quantization_mode={mode}"
252
+ )
253
+
248
254
  embeddings_shape = (self.input_dim, self.output_dim)
249
255
  if mode == "int8":
250
256
  embeddings, embeddings_scale = abs_max_quantize(
@@ -424,3 +424,8 @@ class CausalLM(Task):
424
424
  )
425
425
 
426
426
  export_to_safetensors(self, path)
427
+
428
+ def _post_quantize(self, mode, **kwargs):
429
+ super()._post_quantize(mode, **kwargs)
430
+ # Reset the compiled generate function.
431
+ self.generate_function = None
@@ -1,4 +1,41 @@
1
1
  """DepthAnything model preset configurations."""
2
2
 
3
3
  # Metadata for loading pretrained model weights.
4
- backbone_presets = {}
4
+ backbone_presets = {
5
+ "depth_anything_v2_small": {
6
+ "metadata": {
7
+ "description": (
8
+ "Small variant of Depth Anything V2 monocular depth estimation "
9
+ "(MDE) model trained on synthetic labeled images and real "
10
+ "unlabeled images."
11
+ ),
12
+ "params": 25_311_169,
13
+ "path": "depth_anything",
14
+ },
15
+ "kaggle_handle": "kaggle://keras/depth-anything/keras/depth_anything_v2_small/1",
16
+ },
17
+ "depth_anything_v2_base": {
18
+ "metadata": {
19
+ "description": (
20
+ "Base variant of Depth Anything V2 monocular depth estimation "
21
+ "(MDE) model trained on synthetic labeled images and real "
22
+ "unlabeled images."
23
+ ),
24
+ "params": 98_522_945,
25
+ "path": "depth_anything",
26
+ },
27
+ "kaggle_handle": "kaggle://keras/depth-anything/keras/depth_anything_v2_base/1",
28
+ },
29
+ "depth_anything_v2_large": {
30
+ "metadata": {
31
+ "description": (
32
+ "Large variant of Depth Anything V2 monocular depth estimation "
33
+ "(MDE) model trained on synthetic labeled images and real "
34
+ "unlabeled images."
35
+ ),
36
+ "params": 336_718_529,
37
+ "path": "depth_anything",
38
+ },
39
+ "kaggle_handle": "kaggle://keras/depth-anything/keras/depth_anything_v2_large/1",
40
+ },
41
+ }
@@ -415,3 +415,8 @@ class ImageToImage(Task):
415
415
  # Image-to-image.
416
416
  outputs = [generate(*x) for x in inputs]
417
417
  return self._normalize_generate_outputs(outputs, input_is_scalar)
418
+
419
+ def _post_quantize(self, mode, **kwargs):
420
+ super()._post_quantize(mode, **kwargs)
421
+ # Reset the compiled generate function.
422
+ self.generate_function = None
@@ -518,3 +518,8 @@ class Inpaint(Task):
518
518
  # Inpaint.
519
519
  outputs = [generate(*x) for x in inputs]
520
520
  return self._normalize_generate_outputs(outputs, input_is_scalar)
521
+
522
+ def _post_quantize(self, mode, **kwargs):
523
+ super()._post_quantize(mode, **kwargs)
524
+ # Reset the compiled generate function.
525
+ self.generate_function = None
@@ -345,3 +345,8 @@ class TextToImage(Task):
345
345
  # Text-to-image.
346
346
  outputs = [generate(x) for x in inputs]
347
347
  return self._normalize_generate_outputs(outputs, input_is_scalar)
348
+
349
+ def _post_quantize(self, mode, **kwargs):
350
+ super()._post_quantize(mode, **kwargs)
351
+ # Reset the compiled generate function.
352
+ self.generate_function = None
keras_hub/src/version.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from keras_hub.src.api_export import keras_hub_export
2
2
 
3
3
  # Unique source of truth for the version number.
4
- __version__ = "0.23.0.dev202510150419"
4
+ __version__ = "0.23.0.dev202510170417"
5
5
 
6
6
 
7
7
  @keras_hub_export("keras_hub.version")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: keras-hub-nightly
3
- Version: 0.23.0.dev202510150419
3
+ Version: 0.23.0.dev202510170417
4
4
  Summary: Pretrained models for Keras.
5
5
  Author-email: Keras team <keras-users@googlegroups.com>
6
6
  License-Expression: Apache-2.0
@@ -5,7 +5,7 @@ keras_hub/models/__init__.py,sha256=E9_kQFlM75iKRiSUFEF7F8e9aqMo89-88XSSLy2sbtY,
5
5
  keras_hub/samplers/__init__.py,sha256=aFQIkiqbZpi8vjrPp2MVII4QUfE-eQjra5fMeHsoy7k,886
6
6
  keras_hub/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  keras_hub/src/api_export.py,sha256=9pQZK27JObxWZ96QPLBp1OBsjWigh1iuV6RglPGMRk0,1499
8
- keras_hub/src/version.py,sha256=vcYjts3nZw0ZkBM-3v2E7wVWH_dIHZfR9h7rV9Wl2tw,222
8
+ keras_hub/src/version.py,sha256=QhHRETV8gMH-iFFSUoHNFk78w1l9wnlAvjWBJYCdzaU,222
9
9
  keras_hub/src/layers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  keras_hub/src/layers/modeling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  keras_hub/src/layers/modeling/alibi_bias.py,sha256=1XBTHI52L_iJDhN_w5ydu_iMhCuTgQAxEPwcLA6BPuk,4411
@@ -16,7 +16,7 @@ keras_hub/src/layers/modeling/f_net_encoder.py,sha256=zkVeO5Nk_kBZCUGq2LeDGmPEIM
16
16
  keras_hub/src/layers/modeling/masked_lm_head.py,sha256=no6XQb76KB2cUiksYC0MSdyeDOK7pn8MY6cmdCDxpKs,9015
17
17
  keras_hub/src/layers/modeling/non_max_supression.py,sha256=yAkAH1CCj_tYXgQTav39IRr_Uxn8hmzJgIxqbYQyZY8,22565
18
18
  keras_hub/src/layers/modeling/position_embedding.py,sha256=vqmmUbMU-41Ns6qwR_4N1IvVsV0arGlkiTD7D7NMS2s,4562
19
- keras_hub/src/layers/modeling/reversible_embedding.py,sha256=aBruxDo3nHWUpQxcS2kSLUGhV_obUPKpZKXv281AzzQ,10898
19
+ keras_hub/src/layers/modeling/reversible_embedding.py,sha256=PVZ3G-2pIYp7fU4d6GAB9OpMUPcNGRye0hg_7XG2QBY,11096
20
20
  keras_hub/src/layers/modeling/rms_normalization.py,sha256=Ylnc9vkDw1A_ZqiKpQ09jVTAGumS5rspjdQOkH-mxf4,1084
21
21
  keras_hub/src/layers/modeling/rotary_embedding.py,sha256=uKcEyidierqdEs67QYPMQrJ1u0gxqJYT22_YGnhkQ-I,6546
22
22
  keras_hub/src/layers/modeling/sine_position_encoding.py,sha256=aLoadvQW1eeivac8gzymP740NXppblZ2C_OlErLMfN4,4063
@@ -44,7 +44,7 @@ keras_hub/src/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
44
44
  keras_hub/src/models/audio_to_text.py,sha256=XoOjXtKBX6K1fz-zOXcdVo3FpjuxCMnJZh2LQcYXb_0,2726
45
45
  keras_hub/src/models/audio_to_text_preprocessor.py,sha256=GS-WWyJ6aSsPRxi_0bxvxA00h2mT2FEwSdAoQXAUYVI,3249
46
46
  keras_hub/src/models/backbone.py,sha256=BdqPsne7lIITIxn6jY6AN4vZ-Rc9VnpqTxvVNR3CS7M,12210
47
- keras_hub/src/models/causal_lm.py,sha256=FHGpbyFrDrnPSv5eRLfDgcpvjS6jDhSokMRl-kuumyg,18164
47
+ keras_hub/src/models/causal_lm.py,sha256=x86PTAzoBpAdJyenPRNNBAkazUjcRLr4wb2hMs5SrQ0,18344
48
48
  keras_hub/src/models/causal_lm_preprocessor.py,sha256=nxl-sfmCfkfl6JmVRASa878QbaZUgWSA6Jdu48x4-dY,7155
49
49
  keras_hub/src/models/depth_estimator.py,sha256=JR7wtunOPrfEoDkLspoZnL2ItWhZFDeAxxw2vue5QLs,8992
50
50
  keras_hub/src/models/depth_estimator_preprocessor.py,sha256=2iE8NAUyiD2AvjZwNoXKUaOUogcE1fRzTNXLQ75GZpQ,2822
@@ -53,8 +53,8 @@ keras_hub/src/models/image_classifier.py,sha256=yt6cjhPfqs8A_eWXBsXdXFzn-aRgH2rV
53
53
  keras_hub/src/models/image_classifier_preprocessor.py,sha256=Bf7jSqHB1hX2ZWoWQS4GcXNOY_EjeoJi-_vtzCAqw4o,2690
54
54
  keras_hub/src/models/image_segmenter.py,sha256=C1bzIO59pG58iist5GLn_qnlotDpcAVxPV_8a68BkAc,2876
55
55
  keras_hub/src/models/image_segmenter_preprocessor.py,sha256=d7I2Hk0SKWyKpjRS6WYccmh_CYQBpWoj0JF5RRrU6rw,3748
56
- keras_hub/src/models/image_to_image.py,sha256=IJLZ6svgvcQvypwF6oe4SbJj_Zuk2-CrgHFBQcsY7n8,16753
57
- keras_hub/src/models/inpaint.py,sha256=fxZZrheYIK1rI6BjqZsxt9G2U0afMZR62Z87ZzuSNrQ,20815
56
+ keras_hub/src/models/image_to_image.py,sha256=nblRd-16n5_JxKIH6IJU7bHTFRGxyCpKUilg6VjWuek,16933
57
+ keras_hub/src/models/inpaint.py,sha256=oqdj0Q9dNG54g6sNQ5foto8saPd5Sx8kYZuHCZPBqrY,20995
58
58
  keras_hub/src/models/masked_lm.py,sha256=uXO_dE_hILlOC9jNr6oK6IHi9IGUqLyNGvr6nMt8Rk0,3576
59
59
  keras_hub/src/models/masked_lm_preprocessor.py,sha256=g8vrnyYwqdnSw5xppROM1Gzo_jmMWKYZoQCsKdfrFKk,5656
60
60
  keras_hub/src/models/object_detector.py,sha256=oAK42fFBKuN0G_WM-DhygFkgQ0KsEwU_ZiU4umHywqc,3757
@@ -65,7 +65,7 @@ keras_hub/src/models/seq_2_seq_lm_preprocessor.py,sha256=DJmm4VTt8AdLtq1k9YKl_VR
65
65
  keras_hub/src/models/task.py,sha256=e9zK2zHgeOkjNACcCmAf-lGuEGF_eRoP_lKlirdIXuk,14817
66
66
  keras_hub/src/models/text_classifier.py,sha256=B6cTYDbDZW8vRvenXrLwgMMVIYMb7Pr14GvX8C_wclQ,4159
67
67
  keras_hub/src/models/text_classifier_preprocessor.py,sha256=EoWp-GHnaLnAKTdAzDmC-soAV92ATF3QozdubdV2WXI,4722
68
- keras_hub/src/models/text_to_image.py,sha256=NIy4S6Fh8MsbNiskAFhjmFXgRiiFqn_rOvpGOO6LlF0,13390
68
+ keras_hub/src/models/text_to_image.py,sha256=Y2JcTBLb_l6_nnzASOXDziqP91tCPFN6m9wv6dlSe00,13570
69
69
  keras_hub/src/models/text_to_image_preprocessor.py,sha256=SKMxEABl5sy1QIA3irHTZKs7VgMdx9Cxy4IaxDU6faM,1211
70
70
  keras_hub/src/models/albert/__init__.py,sha256=rR6q_-8FujB1FXp6r4KOI7xi4gFjtAhQwXjp-MIhiyg,257
71
71
  keras_hub/src/models/albert/albert_backbone.py,sha256=4NQFo8lhv8rFiNIwQeZxxKxFwT3nKcCt36FUa6oPGok,10073
@@ -169,7 +169,7 @@ keras_hub/src/models/depth_anything/depth_anything_depth_estimator_preprocessor.
169
169
  keras_hub/src/models/depth_anything/depth_anything_image_converter.py,sha256=Xutwc8IyklFilDcc4psNBwPGRDcFlzalWXsHvEz7rUc,395
170
170
  keras_hub/src/models/depth_anything/depth_anything_layers.py,sha256=_43iEE7F8P7BL4xssjpPeFyhiDk4gGLu-wPxuqQ-nT8,27739
171
171
  keras_hub/src/models/depth_anything/depth_anything_loss.py,sha256=GJqzvLkCZrWsMDO6T2Gt_9-TYJqorfNnyOXSNgLUjQg,3389
172
- keras_hub/src/models/depth_anything/depth_anything_presets.py,sha256=mJ1Kg6J5lP1GkrEDH_qS1XJ__98Tjt5noRZVZaHCn9k,121
172
+ keras_hub/src/models/depth_anything/depth_anything_presets.py,sha256=A3Afr06IRL02u-9EPNTTiGb6DgzjQavSwVmWHz0OoMc,1536
173
173
  keras_hub/src/models/depth_anything/interpolate.py,sha256=qwrPGP6wA4jZ-XcSeulhkyxPDiMRxHlC92EqSd0H5Tk,2041
174
174
  keras_hub/src/models/dinov2/__init__.py,sha256=qacZi82EfAloVND4gDLZjqgR5_yVdz_dc4mMKyCsjOA,257
175
175
  keras_hub/src/models/dinov2/dinov2_backbone.py,sha256=QH3lzE1EnxTcOSii9KS1Qx3lq0XcZMsvElB7AL_ejZY,10672
@@ -610,7 +610,7 @@ keras_hub/src/utils/transformers/export/gemma.py,sha256=xX_vfQwvFZ_-lQX4kgMNOGKL
610
610
  keras_hub/src/utils/transformers/export/hf_exporter.py,sha256=Qk52c6LIA2eMHUNY9Vy4STJSpnhLMdJ_t-3ljqhSr4k,5081
611
611
  keras_hub/tokenizers/__init__.py,sha256=kyFWYm4mb--U4xYU-2Gb1COM8xEFWNK6LcKxr8h9Ivc,4561
612
612
  keras_hub/utils/__init__.py,sha256=jXPqVGBpJr_PpYmqD8aDG-fRMlxH-ulqCR2SZMn288Y,646
613
- keras_hub_nightly-0.23.0.dev202510150419.dist-info/METADATA,sha256=kplsqZ2jhRdxM0KN1cXDibhuSWMWu2f3Mt41vZhyHv8,7395
614
- keras_hub_nightly-0.23.0.dev202510150419.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
615
- keras_hub_nightly-0.23.0.dev202510150419.dist-info/top_level.txt,sha256=N4J6piIWBKa38A4uV-CnIopnOEf8mHAbkNXafXm_CuA,10
616
- keras_hub_nightly-0.23.0.dev202510150419.dist-info/RECORD,,
613
+ keras_hub_nightly-0.23.0.dev202510170417.dist-info/METADATA,sha256=7uTd-YS4ylZmQT0k7rfgGYmhJcoHSw56H1T923OsH6I,7395
614
+ keras_hub_nightly-0.23.0.dev202510170417.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
615
+ keras_hub_nightly-0.23.0.dev202510170417.dist-info/top_level.txt,sha256=N4J6piIWBKa38A4uV-CnIopnOEf8mHAbkNXafXm_CuA,10
616
+ keras_hub_nightly-0.23.0.dev202510170417.dist-info/RECORD,,