cactus-compute 4.2.0__tar.gz → 4.2.2__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 (112) hide show
  1. {cactus_compute-4.2.0/cactus_compute.egg-info → cactus_compute-4.2.2}/PKG-INFO +6 -2
  2. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/README.md +5 -1
  3. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/__init__.py +1 -1
  4. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/fetch.py +3 -3
  5. cactus_compute-4.2.2/cactus/mlx/kernels/bicubic_resize.metal +15 -0
  6. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/vision.py +52 -42
  7. {cactus_compute-4.2.0 → cactus_compute-4.2.2/cactus_compute.egg-info}/PKG-INFO +6 -2
  8. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus_compute.egg-info/SOURCES.txt +1 -0
  9. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/llms.txt +1 -1
  10. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/pyproject.toml +1 -1
  11. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/LICENSE +0 -0
  12. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/MANIFEST.in +0 -0
  13. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/__main__.py +0 -0
  14. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/_telemetry.py +0 -0
  15. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/_worker.py +0 -0
  16. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/__init__.py +0 -0
  17. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/audio.py +0 -0
  18. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/grounding.py +0 -0
  19. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/mirage.py +0 -0
  20. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/runtime.py +0 -0
  21. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/text.py +0 -0
  22. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/tools.py +0 -0
  23. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/agent/whistle.py +0 -0
  24. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/cli/__init__.py +0 -0
  25. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/cli/download.py +0 -0
  26. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/cli/logging.py +0 -0
  27. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/cli/parser.py +0 -0
  28. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/cli/speech.py +0 -0
  29. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/cli/vision.py +0 -0
  30. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/__init__.py +0 -0
  31. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/_harness.py +0 -0
  32. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/data_capture.py +0 -0
  33. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/kitchen_appliance.py +0 -0
  34. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/media_player.py +0 -0
  35. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/productivity.py +0 -0
  36. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/smart_home.py +0 -0
  37. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/environments/wearable.py +0 -0
  38. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/NOTICE +0 -0
  39. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/__init__.py +0 -0
  40. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/_environment.py +0 -0
  41. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/bench_decode.py +0 -0
  42. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/checkpoint.py +0 -0
  43. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/cli.py +0 -0
  44. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/generate.py +0 -0
  45. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/generation.py +0 -0
  46. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/kernels/common.metal +0 -0
  47. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/kernels/gather.metal +0 -0
  48. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/kernels/int_dot.metal +0 -0
  49. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/kernels/matvec_int.metal +0 -0
  50. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/kernels/matvec_lut.metal +0 -0
  51. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/kernels/prepare_permute.metal +0 -0
  52. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/kernels/ssm_verify.metal +0 -0
  53. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/__init__.py +0 -0
  54. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/nemotron.py +0 -0
  55. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/nemotron_decode.py +0 -0
  56. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/nemotron_mtp.py +0 -0
  57. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/nemotron_speculative.py +0 -0
  58. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/nemotron_validate.py +0 -0
  59. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/nemotron_verify.py +0 -0
  60. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/models/nemotron_vision.py +0 -0
  61. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/ops.py +0 -0
  62. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/reference.py +0 -0
  63. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/runtime.py +0 -0
  64. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/mlx/server.py +0 -0
  65. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/__init__.py +0 -0
  66. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/architecture.py +0 -0
  67. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/architecture_mlx.py +0 -0
  68. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/build.py +0 -0
  69. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/checkpoints.py +0 -0
  70. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/config.py +0 -0
  71. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/export.py +0 -0
  72. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/finetune.py +0 -0
  73. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/quantize.py +0 -0
  74. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/quantize_mlx.py +0 -0
  75. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/run.py +0 -0
  76. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/tokenizer.py +0 -0
  77. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/whistle.py +0 -0
  78. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/model/whistle_finetune.py +0 -0
  79. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/platform.py +0 -0
  80. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/playground/__init__.py +0 -0
  81. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/playground/app.js +0 -0
  82. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/playground/index.html +0 -0
  83. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/playground/server.py +0 -0
  84. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus/playground/style.css +0 -0
  85. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus_compute.egg-info/dependency_links.txt +0 -0
  86. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus_compute.egg-info/entry_points.txt +0 -0
  87. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus_compute.egg-info/requires.txt +0 -0
  88. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/cactus_compute.egg-info/top_level.txt +0 -0
  89. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/setup.cfg +0 -0
  90. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_build.py +0 -0
  91. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_environments.py +0 -0
  92. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_fetch.py +0 -0
  93. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_finetune.py +0 -0
  94. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_generate.py +0 -0
  95. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_grounding.py +0 -0
  96. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_inference.py +0 -0
  97. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_lora.py +0 -0
  98. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_mirage.py +0 -0
  99. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_mlx.py +0 -0
  100. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_mlx_entrypoint.py +0 -0
  101. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_packaging.py +0 -0
  102. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_platform.py +0 -0
  103. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_playground.py +0 -0
  104. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_quantize_mlx.py +0 -0
  105. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_release.py +0 -0
  106. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_render.py +0 -0
  107. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_run.py +0 -0
  108. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_tools.py +0 -0
  109. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_weights.py +0 -0
  110. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_whistle.py +0 -0
  111. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_whistle_finetune.py +0 -0
  112. {cactus_compute-4.2.0 → cactus_compute-4.2.2}/tests/test_worker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cactus-compute
3
- Version: 4.2.0
3
+ Version: 4.2.2
4
4
  Summary: Local voice, vision, agents and quantized language-model inference.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://cactuscompute.com
@@ -140,4 +140,8 @@ installing this release. Its Python imports move from `cactus_mlx` to `cactus.ml
140
140
 
141
141
  Migrating from `cactus-needle`? Use `import cactus` and the `cactus` command. Needle 2 remains on the [legacy branch](https://github.com/cactus-compute/cactus/tree/legacy) with `cactus-compute<4`. The earlier general inference SDK is now [cactus-engine](https://pypi.org/project/cactus-engine/).
142
142
 
143
- Anonymous Python usage counts can be disabled with `CACTUS_TELEMETRY=0`. See [LICENSE](LICENSE) for the Apache 2.0 license.
143
+ Anonymous Python usage counts can be disabled with `CACTUS_TELEMETRY=0`.
144
+
145
+ ## License
146
+
147
+ [Apache 2.0](LICENSE), including the prebuilt runtime binaries.
@@ -90,4 +90,8 @@ installing this release. Its Python imports move from `cactus_mlx` to `cactus.ml
90
90
 
91
91
  Migrating from `cactus-needle`? Use `import cactus` and the `cactus` command. Needle 2 remains on the [legacy branch](https://github.com/cactus-compute/cactus/tree/legacy) with `cactus-compute<4`. The earlier general inference SDK is now [cactus-engine](https://pypi.org/project/cactus-engine/).
92
92
 
93
- Anonymous Python usage counts can be disabled with `CACTUS_TELEMETRY=0`. See [LICENSE](LICENSE) for the Apache 2.0 license.
93
+ Anonymous Python usage counts can be disabled with `CACTUS_TELEMETRY=0`.
94
+
95
+ ## License
96
+
97
+ [Apache 2.0](LICENSE), including the prebuilt runtime binaries.
@@ -5,7 +5,7 @@ from .agent.tools import Field, tool
5
5
  from .agent.grounding import ExtractionValidationError
6
6
  from .agent.runtime import set_threads
7
7
 
8
- __version__ = "4.2.0"
8
+ __version__ = "4.2.2"
9
9
  Needle = Cactus
10
10
 
11
11
  __all__ = ["Cactus", "Needle", "Whistle", "Mirage", "Field", "tool", "extract",
@@ -11,9 +11,9 @@ import zipfile
11
11
  WHISTLE = "whistle"
12
12
  MIRAGE = "mirage"
13
13
  ENGINE_REPO = "Cactus-Compute/cactus"
14
- ENGINE_VERSION = "4.1.0"
15
- ENGINE_REVISION = "4e822c9036be2eb0e47ef556df32a818bb1572ef"
16
- MANIFEST_SHA256 = "32e182f6f811acde1109084ee5f5c9a606098b95cc8774f27ece8bc1a506de3b"
14
+ ENGINE_VERSION = "4.1.1"
15
+ ENGINE_REVISION = "d2c5cd70432ed78345f3ba6b620bff2feeec6c86"
16
+ MANIFEST_SHA256 = "27168631232dbff52a205b54bbfad54fd9b81f06fa368657d07449e2221f5e25"
17
17
  MODEL_REPOS = {3: "Cactus-Compute/needle3", WHISTLE: "Cactus-Compute/whistle", MIRAGE: "Cactus-Compute/mirage"}
18
18
  MODEL_REVISIONS = {
19
19
  3: "d6c7d6a2e9655505e0f8e23339356dd1705900eb",
@@ -0,0 +1,15 @@
1
+ uint x = thread_position_in_grid.x, y = thread_position_in_grid.y;
2
+ uint width = column_weights_shape[0], column_taps = column_weights_shape[1], row_taps = row_weights_shape[1];
3
+ float3 total = 0.0f;
4
+ for (uint r = 0; r < row_taps; ++r) {
5
+ ulong row = ulong(rows[y * row_taps + r]) * pixels_shape[1];
6
+ float3 line = 0.0f;
7
+ for (uint c = 0; c < column_taps; ++c) {
8
+ ulong p = (row + columns[x * column_taps + c]) * 3;
9
+ line += column_weights[x * column_taps + c] * float3(pixels[p], pixels[p + 1], pixels[p + 2]);
10
+ }
11
+ total += row_weights[y * row_taps + r] * line;
12
+ }
13
+ uint plane = row_weights_shape[0] * width;
14
+ for (uint channel = 0; channel < 3; ++channel)
15
+ out[channel * plane + y * width + x] = (total[channel] / 255.0f - mean[channel]) / std[channel];
@@ -2,24 +2,32 @@
2
2
 
3
3
  Patch sizing follows NVIDIA's NemotronH Omni image processor (Apache-2.0).
4
4
  Copyright (c) 2026 NVIDIA CORPORATION. All rights reserved.
5
- Modified by Cactus Compute: NumPy resizing and MLX-LM processor interface.
5
+ Modified by Cactus Compute: Metal resizing and MLX-LM processor interface.
6
6
  Licensed under the Apache License, Version 2.0; see LICENSE.
7
7
  """
8
8
  import base64
9
9
  import io
10
10
  import math
11
+ from functools import cache, lru_cache
11
12
  from pathlib import Path
12
13
  from urllib.request import urlopen
13
14
 
15
+ import mlx.core as mx
14
16
  import numpy as np
15
17
  from PIL import Image
16
18
 
19
+ from .ops import KERNELS
20
+
21
+
22
+ def _rgb_pixels(image):
23
+ return np.asarray(image if image.mode == 'RGB' else image.convert('RGB'))
24
+
17
25
 
18
26
  def load_image(source):
19
- if isinstance(source, Image.Image):
20
- return source.convert('RGB')
21
27
  if isinstance(source, np.ndarray):
22
- return Image.fromarray(source).convert('RGB')
28
+ source = Image.fromarray(source)
29
+ if isinstance(source, Image.Image):
30
+ return _rgb_pixels(source)
23
31
  source = str(source)
24
32
  if source.startswith('data:'):
25
33
  source = io.BytesIO(base64.b64decode(source.partition(',')[2], validate=True))
@@ -29,39 +37,43 @@ def load_image(source):
29
37
  else:
30
38
  source = Path(source).expanduser()
31
39
  with Image.open(source) as image:
32
- return image.convert('RGB')
33
-
34
-
35
- def resize_bicubic(image, height, width):
36
- """Float32 antialiased bicubic resize; retain overshoot as PyTorch does."""
37
- image = np.asarray(image, dtype=np.float32)
38
-
39
- def axis_resize(data, output, axis):
40
- original = data.shape[axis]
41
- if original == output:
42
- return data
43
- scale = np.float32(original / output)
44
- filter_scale = np.maximum(scale, np.float32(1))
45
- support = np.float32(2) * filter_scale
46
- shape = list(data.shape)
47
- shape[axis] = output
48
- result = np.empty(shape, dtype=np.float32)
49
- for index in range(output):
50
- center = scale * np.float32(index + 0.5)
51
- first = max(0, int(center - support + np.float32(0.5)))
52
- end = min(original, int(center + support + np.float32(0.5)))
53
- x = np.abs((np.arange(first, end, dtype=np.float32) + np.float32(0.5) - center) / filter_scale)
54
- coefficients = np.where(x < 1, ((np.float32(1.5) * x - np.float32(2.5)) * x) * x + 1,
55
- ((np.float32(-0.5) * x + np.float32(2.5)) * x - 4) * x + 2)
56
- coefficients[x >= 2] = 0
57
- coefficients /= coefficients.sum(dtype=np.float32)
58
- if axis == 1:
59
- result[:, index] = np.einsum('hkc,k->hc', data[:, first:end], coefficients)
60
- else:
61
- result[index] = np.einsum('kwc,k->wc', data[first:end], coefficients)
62
- return result
63
-
64
- return axis_resize(axis_resize(image, width, 1), height, 0)
40
+ return _rgb_pixels(image)
41
+
42
+
43
+ @lru_cache(maxsize=32)
44
+ def _bicubic_taps(original, output):
45
+ scale = np.float32(original / output)
46
+ filter_scale = np.maximum(scale, np.float32(1))
47
+ support = np.float32(2) * filter_scale
48
+ center = scale * (np.arange(output, dtype=np.float32) + np.float32(0.5))
49
+ first = np.maximum(0, (center - support + np.float32(0.5)).astype(np.int64))
50
+ end = np.minimum(original, (center + support + np.float32(0.5)).astype(np.int64))
51
+ position = first[:, None] + np.arange((end - first).max())
52
+ x = np.abs((position.astype(np.float32) + np.float32(0.5) - center[:, None]) / filter_scale)
53
+ weights = np.where(x < 1, ((np.float32(1.5) * x - np.float32(2.5)) * x) * x + 1,
54
+ ((np.float32(-0.5) * x + np.float32(2.5)) * x - 4) * x + 2)
55
+ weights[(x >= 2) | (position >= end[:, None])] = 0
56
+ weights /= weights.sum(axis=1, keepdims=True, dtype=np.float32)
57
+ return mx.array(weights), mx.array(np.minimum(position, original - 1).astype(np.uint32))
58
+
59
+
60
+ @cache
61
+ def _resize_kernel():
62
+ return mx.fast.metal_kernel(
63
+ name='bicubic_resize', output_names=['out'],
64
+ input_names=['pixels', 'column_weights', 'columns', 'row_weights', 'rows', 'mean', 'std'],
65
+ source=(KERNELS / 'bicubic_resize.metal').read_text(), compile_options={'math_mode': 'safe'})
66
+
67
+
68
+ def resize_bicubic(image, height, width, mean, std):
69
+ """Antialiased bicubic resize to float32 (3, height, width) as (x / 255 - mean) / std, with PyTorch's overshoot."""
70
+ column_weights, columns = _bicubic_taps(image.shape[1], width)
71
+ row_weights, rows = _bicubic_taps(image.shape[0], height)
72
+ return _resize_kernel()(
73
+ inputs=[mx.array(image), column_weights, columns, row_weights, rows,
74
+ mx.array(mean, mx.float32), mx.array(std, mx.float32)],
75
+ grid=(width, height, 1), threadgroup=(16, 16, 1),
76
+ output_shapes=[(3, height, width)], output_dtypes=[mx.float32])[0]
65
77
 
66
78
 
67
79
  class ImageProcessor:
@@ -92,11 +104,9 @@ class ImageProcessor:
92
104
  return hp * self.patch_size, wp * self.patch_size
93
105
 
94
106
  def preprocess(self, source):
95
- image = load_image(source)
96
- height, width = self.target_size(*image.size)
97
- pixels = resize_bicubic(np.asarray(image), height, width)
98
- pixels = (pixels / np.float32(255) - self.mean) / self.std
99
- return pixels.transpose(2, 0, 1).copy()
107
+ pixels = load_image(source)
108
+ height, width = self.target_size(pixels.shape[1], pixels.shape[0])
109
+ return resize_bicubic(pixels, height, width, self.mean, self.std)
100
110
 
101
111
  def __call__(self, text, *, images):
102
112
  parts = text.split(self.image_token)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cactus-compute
3
- Version: 4.2.0
3
+ Version: 4.2.2
4
4
  Summary: Local voice, vision, agents and quantized language-model inference.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://cactuscompute.com
@@ -140,4 +140,8 @@ installing this release. Its Python imports move from `cactus_mlx` to `cactus.ml
140
140
 
141
141
  Migrating from `cactus-needle`? Use `import cactus` and the `cactus` command. Needle 2 remains on the [legacy branch](https://github.com/cactus-compute/cactus/tree/legacy) with `cactus-compute<4`. The earlier general inference SDK is now [cactus-engine](https://pypi.org/project/cactus-engine/).
142
142
 
143
- Anonymous Python usage counts can be disabled with `CACTUS_TELEMETRY=0`. See [LICENSE](LICENSE) for the Apache 2.0 license.
143
+ Anonymous Python usage counts can be disabled with `CACTUS_TELEMETRY=0`.
144
+
145
+ ## License
146
+
147
+ [Apache 2.0](LICENSE), including the prebuilt runtime binaries.
@@ -44,6 +44,7 @@ cactus/mlx/reference.py
44
44
  cactus/mlx/runtime.py
45
45
  cactus/mlx/server.py
46
46
  cactus/mlx/vision.py
47
+ cactus/mlx/kernels/bicubic_resize.metal
47
48
  cactus/mlx/kernels/common.metal
48
49
  cactus/mlx/kernels/gather.metal
49
50
  cactus/mlx/kernels/int_dot.metal
@@ -296,5 +296,5 @@ Adapt by swapping the Literal values for your own and keeping the shapes: closed
296
296
 
297
297
  ## Telemetry
298
298
 
299
- Anonymous usage counts only (function name, package version, OS, random install id - never prompts, outputs, or data). Opt out with `NEEDLE_TELEMETRY=0` or `DO_NOT_TRACK=1`; `CI` environments are excluded automatically.
299
+ Anonymous usage counts only (function name, package version, OS, random install id - never prompts, outputs, or data). Opt out with `CACTUS_TELEMETRY=0` or `DO_NOT_TRACK=1`; `CI` environments are excluded automatically.
300
300
  ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cactus-compute"
3
- version = "4.2.0"
3
+ version = "4.2.2"
4
4
  description = "Local voice, vision, agents and quantized language-model inference."
5
5
  requires-python = ">=3.9"
6
6
  readme = "README.md"
File without changes
File without changes