It seems you have an additional unnecessary dimension in images.
Could you remove dim1 or dim2 in images (both have the size 1) and it should work.
# Your error
images = torch.randn(6, 1, 1, 480, 640)
for img in images:
    print(img.shape)
img = make_grid(images)

# works
images = torch.randn(6, 1, 480, 640)
for img in images:
    print(img.shape)
img = make_grid(images)