Torch.jit.script getting stuck in torchvision.transforms

Here the t isn’t a tensor rather a function. I also tried to resolve it by passing example_inputs, but still it’s giving same error.

cannot call a value of type 'Tensor':
  File "/opt/homebrew/Caskroom/mambaforge/base/envs/mlx/lib/python3.11/site-packages/torchvision/transforms/", line 95
    def __call__(self, img):
        for t in self.transforms:
            img = t(img)
                  ~ <--- HERE
        return img