src/transformers/models/oneformer/modeling_oneformer.py/OneFormerTransformerDecoderSelfAttentionLayer/with_pos_embed
class OneFormerTransformerDecoderSelfAttentionLayer:    def with_pos_embed(self, tensor, pos: Optional[Tensor]):
        return tensor if pos is None else tensor + pos