When passing a gray scale PIL image (mode='L') to the SamProcessor, the SamImageProcessor is called to preprocess the image. This includes potentially converting the image to rgb if possible. This is ...