To create 4 patches of your input, you could use unfold as shown here:
x = torch.randn(3, 24, 24) # channels, height, width
kernel_size, stride = 12, 12
patches = x.unfold(1, kernel_size, stride).unfold(2, kernel_size, stride)
patches = patches.contiguous().view(patches.size(0), -1, kernel_size, kernel_size)
print(patches.shape) # channels, patches, kernel_size, kernel_size
> torch.Size([3, 4, 12, 12])

Once you have these patches, you could pass them to your model separately or as a batch.