I think I still misunderstand the problem, but the definition of a conv layer does not take the resolution as an input.
If you mean the actual if condition in your Keras code, you could apply the same condition in PyTorch and add the conv layers e.g. to a nn.ModuleList (or use this condition in the forward).
Could you point me to the line of code in your Keras snippet, which seems to create problems?