class_docstr: A convolutional layer that is used with LoRA.
  
  Parameters:
      in_features (`int`):
          Number of input features.
      out_features (`int`):
          Number of output features.
      rank (`int`, `optional`, defaults to 4):
          The rank of the LoRA layer.
      kernel_size (`int` or `tuple` of two `int`, `optional`, defaults to 1):
          The kernel size of the convolution.
      stride (`int` or `tuple` of two `int`, `optional`, defaults to 1):
          The stride of the convolution.
      padding (`int` or `tuple` of two `int` or `str`, `optional`, defaults to 0):
          The padding of the convolution.
      network_alpha (`float`, `optional`, defaults to `None`):
          The value of the network alpha used for stable learning and preventing underflow. This value has the same
          meaning as the `--network_alpha` option in the kohya-ss trainer script. See
          https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning
code: def __init__(
      self,
      in_features: int,
      out_features: int,
      rank: int = 4,
      kernel_size: Union[int, Tuple[int, int]] = (1, 1),
      stride: Union[int, Tuple[int, int]] = (1, 1),
      padding: Union[int, Tuple[int, int], str] = 0,
      network_alpha: Optional[float] = None,
  ):
      super().__init__()
  
      self.down = nn.Conv2d(
          in_features,
          rank,
          kernel_size=kernel_size,
          stride=stride,
          padding=padding,
          bias=False,
      )
      # according to the official kohya_ss trainer kernel_size are always fixed for the up layer
      # # see: https://github.com/bmaltais/kohya_ss/blob/2accb1305979ba62f5077a23aabac23b4c37e935/networks/lora_diffusers.py#L129
      self.up = nn.Conv2d(
          rank,
          out_features,
          kernel_size=(1, 1),
          stride=(1, 1),
          bias=False,
      )
  
      # This value has the same meaning as the `--network_alpha` option in the kohya-ss trainer script.
      # See https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning
      self.network_alpha = network_alpha
      self.rank = rank
  
      nn.init.normal_(self.down.weight, std=1 / rank)
      nn.init.zeros_(self.up.weight)
  
imports: from typing import Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from torch import nn
  from ..utils import logging
  from ..utils.import_utils import is_transformers_available
label_desc: Use image node_id 1 to create a new LoRAConv2dLayer object from inherited base classes: nn with example: obj = LoRAConv2dLayer(in_features, out_features, rank, kernel_size, stride, padding, network_alpha)