code: def forward(
      self,
      x: th.Tensor,
      emb: th.Tensor,
      num_video_frames: int,
      image_only_indicator: Optional[th.Tensor] = None,
  ) -> th.Tensor:
      x = super().forward(x, emb)
  
      x_mix = rearrange(
          x, "(b t) c h w -> b c t h w", t=num_video_frames
      )
      x = rearrange(x, "(b t) c h w -> b c t h w", t=num_video_frames)
  
      x = self.time_stack(
          x, rearrange(emb, "(b t) ... -> b t ...", t=num_video_frames)
      )
      x = self.time_mixer(
          x_spatial=x_mix,
          x_temporal=x,
          image_only_indicator=image_only_indicator,
      )
      x = rearrange(x, "b c t h w -> (b t) c h w")
      return x
  
file_path: generative-models/sgm/modules/diffusionmodules/video_model.py
imports: from functools import partial
  from typing import List, Optional, Union
  from einops import rearrange
  from ...modules.diffusionmodules.openaimodel import *
  from ...modules.video_attention import SpatialVideoTransformer
  from ...util import default
  from .util import AlphaBlender
label_desc: Use image node_id 2 for calling the VideoResBlock obj's underlying member method code with example usage: obj.forward(x, emb, num_video_frames, image_only_indicator) and returns: x