I’m not sure, what “reduce intermediate variants” means, but you could generally save memory by lowering the batch size or by e.g. using torch.utils.checkpoint.
Based on your previous description, I don’t think you can save memory by splitting the input into different patches.
I might misunderstand the explanation still, so you could double check this claim:
check which intermediate tensors and gradients would be used using the “patch approach” and compare it to the use case where the complete input is passed.
If I’m not mistaken, both should yield the same memory usage, since you need the entire output for the downstream task.