I think you would unfortunately have to define separate transposed convolution layers, since the current code just reuses self.up.
While this is correct for nn.Upsample, as it doesn’t contain trainable parameters, most likely you don’t want to reuse the nn.ConvTranpose2d layer.
You could try to define a new submodule, which could accept two inputs and use the transposed conv internally, but you would still have to change some modules.