Looking at torchvision.datasets.ImageFolder code here 159 it seems like
tiff is not supported. This seems like a small bug, since PIL.Image loads tiff without problems?
You can always copy the source I just linked and add tiff extension to IMG_EXTENSIONS, it should then work without issues?
As a hacky workaround:
ls /tmp/test/images/
foo.png  foo.tiff

from torchvision.datasets import ImageFolder
from torchvision.datasets.folder import IMG_EXTENSIONS

len(ImageFolder("/tmp/test/"))  # prints 1

IMG_EXTENSIONS.append('tiff')

len(ImageFolder("/tmp/test/"))  # prints 2