Are you making sure the images are not smaller than the crop size of 128?
I get a similar issue, if I pass small images to the transformation:
img = TF.to_pil_image(torch.randn(3, 50, 50))
crop = transforms.RandomCrop(128)
out = crop(img)
> RuntimeError: random_ expects 'from' to be less than 'to', but got from=0 >= to=-77

The error message might be different, if you are using an older torchvision, since the random size sampling was changed in this PR 3 to torch.randint.