gemma icon indicating copy to clipboard operation
gemma copied to clipboard

Remove TensorFlow dependency from image.py

Open AshNicolus opened this issue 1 year ago • 0 comments

Remove TensorFlow dependency from multimodal/image.py

Replace tf.image decoding/resizing with Pillow + NumPy + JAX.

  • Convert float inputs (0..1 or 0..255) to uint8 for processing.
  • Resize with PIL.BILINEAR, convert back to JAX array.
  • Normalize and clip outputs to [-1, 1].
  • Resolve TODO(eyvinec) to remove TF dependency.

AshNicolus avatar Oct 17 '25 17:10 AshNicolus