class_docstr: Temporal convolutional layer that can be used for video (sequence of images) input Code mostly copied from:
  https://github.com/modelscope/modelscope/blob/1509fdb973e5871f37148a4b5e5964cafd43e64d/modelscope/models/multi_modal/video_synthesis/unet_sd.py#L1016
  
  Parameters:
      in_dim (`int`): Number of input channels.
      out_dim (`int`): Number of output channels.
      dropout (`float`, *optional*, defaults to `0.0`): The dropout probability to use.
class_docstr_tok: ["Temporal","convolutional","layer","that","can","be","used","for","video","(","sequence","of","images",")","input","Code","mostly","copied","from",":","https",":","\/\/github.com\/modelscope\/modelscope\/blob\/1509fdb973e5871f37148a4b5e5964cafd43e64d\/modelscope\/models\/multi_modal\/video_synthesis\/unet_sd.py","#","L1016","Parameters",":","in_dim","(","`","int","`",")",":","Number","of","input","channels",".","out_dim","(","`","int","`",")",":","Number","of","output","channels",".","dropout","(","`","float","`",",","*","optional","*",",","defaults","to","`","0.0","`",")",":","The","dropout","probability","to","use","."]
code: def __init__(
      self,
      in_dim: int,
      out_dim: Optional[int] = None,
      dropout: float = 0.0,
  ):
      super().__init__()
      out_dim = out_dim or in_dim
      self.in_dim = in_dim
      self.out_dim = out_dim
  
      # conv layers
      self.conv1 = nn.Sequential(
          nn.GroupNorm(32, in_dim),
          nn.SiLU(),
          nn.Conv3d(in_dim, out_dim, (3, 1, 1), padding=(1, 0, 0)),
      )
      self.conv2 = nn.Sequential(
          nn.GroupNorm(32, out_dim),
          nn.SiLU(),
          nn.Dropout(dropout),
          nn.Conv3d(out_dim, in_dim, (3, 1, 1), padding=(1, 0, 0)),
      )
      self.conv3 = nn.Sequential(
          nn.GroupNorm(32, out_dim),
          nn.SiLU(),
          nn.Dropout(dropout),
          nn.Conv3d(out_dim, in_dim, (3, 1, 1), padding=(1, 0, 0)),
      )
      self.conv4 = nn.Sequential(
          nn.GroupNorm(32, out_dim),
          nn.SiLU(),
          nn.Dropout(dropout),
          nn.Conv3d(out_dim, in_dim, (3, 1, 1), padding=(1, 0, 0)),
      )
  
      # zero out the last layer params,so the conv block is identity
      nn.init.zeros_(self.conv4[-1].weight)
      nn.init.zeros_(self.conv4[-1].bias)
  
imports: from functools import partial
  from typing import Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from ..utils import USE_PEFT_BACKEND
  from .activations import get_activation
  from .attention import AdaGroupNorm
  from .attention_processor import SpatialNorm
  from .lora import LoRACompatibleConv, LoRACompatibleLinear
label_desc: Use image node_id 1 to create a new TemporalConvLayer object from inherited base classes: nn with example: obj = TemporalConvLayer(in_dim, out_dim, dropout)