def from_native_module(
        module: nn.Conv2d, process_group: Union[ProcessGroup, List[ProcessGroup]], **kwargs
    ) -> ParallelModule:
        r"""
        Convert a native PyTorch conv2d layer to a tensor parallelized layer.
        """

        conv2d_tp = Conv2dTPRow(
            in_channels=module.in_channels,
            out_channels=module.out_channels,
            kernel_size=module.kernel_size,
            stride=module.stride,
            padding=module.padding,
            dilation=module.dilation,
            groups=module.groups,
            bias=module.bias is not None,
            padding_mode=module.padding_mode,
            device=module.weight.device,
            dtype=module.weight.dtype,
            tp_group=process_group,
            weight=module.weight,
            bias_=module.bias,
            **kwargs,
        )
        conv2d_tp.weight = module.weight
        conv2d_tp.bias = module.bias
        return conv2d_tp

        Convert a native PyTorch conv2d layer to a tensor parallelized layer.
        
opensora/models/vae/tensor_parallel.py