You may try to 0-pad your patches but they will be of different spatial dimensions, so you won’t be able to stack them into a mini-batch for training.
A workaround for this is feeding images one by one and summing gradients. e.g.:
for epoch in EPOCHS:
    for img, target in images:
        for _ in range(BATCH_SIZE):
            out = net(img)
            loss = criterion(img, out)
            loss.backward()
        optimizer.step()
        optimizer.zero_grad()

calling .backward() multiple times before .zero_grad() sums gradients, much as if it was a mini-batch.
Hope this helps