The OverlapPatchEmbed class returns 3 values in its forward as seen here 2.
In your code you are trying to assign these return values via:
x, (H, W) = self.patch_embed1(x)

which won’t work, as you would either have to assign all three values separately (x, H, W = self.patch_embed1(x)) or return the last two as a tuple (return x, (H, W)) in the forward method.