class_docstr: A 1D downsampling layer with an optional convolution.
  
  Parameters:
      channels (`int`):
          number of channels in the inputs and outputs.
      use_conv (`bool`, default `False`):
          option to use a convolution.
      out_channels (`int`, optional):
          number of output channels. Defaults to `channels`.
      padding (`int`, default `1`):
          padding for the convolution.
      name (`str`, default `conv`):
          name of the downsampling 1D layer.
class_docstr_tok: ["A","1D","downsampling","layer","with","an","optional","convolution",".","Parameters",":","channels","(","`","int","`",")",":","number","of","channels","in","the","inputs","and","outputs",".","use_conv","(","`","bool","`",",","default","`","False","`",")",":","option","to","use","a","convolution",".","out_channels","(","`","int","`",",","optional",")",":","number","of","output","channels",".","Defaults","to","`","channels","`",".","padding","(","`","int","`",",","default","`","1","`",")",":","padding","for","the","convolution",".","name","(","`","str","`",",","default","`","conv","`",")",":","name","of","the","downsampling","1D","layer","."]
code: def forward(self, inputs: torch.Tensor) -> torch.Tensor:
      assert inputs.shape[1] == self.channels
      return self.conv(inputs)
  
imports: from typing import Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from ..utils import USE_PEFT_BACKEND
  from .lora import LoRACompatibleConv
  from .normalization import RMSNorm
  from .upsampling import upfirdn2d_native
label_desc: Use image node_id 2 for calling the Downsample1D obj's underlying member method code with example usage: obj.forward(inputs) and returns: self