class_docstr: Resolver for  request and responses from [HuggingFace Diffusers](https://huggingface.co/docs/diffusers/index) multi-modal Diffusion Pipelines, providing necessary data transformations, formatting, and logging.
  
  This resolver is internally involved in the
  `__call__` for `wandb.integration.diffusers.pipeline_resolver.DiffusersPipelineResolver`.
  This is based on `wandb.sdk.integration_utils.auto_logging.RequestResponseResolver`.
  
  Arguments:
      pipeline_name: (str) The name of the Diffusion Pipeline.
class_docstr_tok: ["Resolver","for","request","and","responses","from","[","HuggingFace","Diffusers","]","(","https",":","\/\/huggingface.co\/docs\/diffusers\/index",")","multi-modal","Diffusion","Pipelines",",","providing","necessary","data","transformations",",","formatting",",","and","logging",".","This","resolver","is","internally","involved","in","the","`","__call__","`","for","`","wandb.integration.diffusers.pipeline_resolver.DiffusersPipelineResolver","`",".","This","is","based","on","`","wandb.sdk.integration_utils.auto_logging.RequestResponseResolver","`",".","Arguments",":","pipeline_name",":","(","str",")","The","name","of","the","Diffusion","Pipeline","."]
docstr: Log the generated images, audio, video, etc. from the Diffusion Pipeline's response along with an optional caption to a media panel in the run.
  
  Arguments:
      image: (Any) The generated images, audio, video, etc. from the Diffusion
          Pipeline's response.
      loggable_kwarg_chunks: (List) Loggable chunks of kwargs.
docstr_tok: ["Log","the","generated","images",",","audio",",","video",",","etc",".","from","the","Diffusion","Pipeline","'s","response","along","with","an","optional","caption","to","a","media","panel","in","the","run",".","Arguments",":","image",":","(","Any",")","The","generated","images",",","audio",",","video",",","etc",".","from","the","Diffusion","Pipeline","'s","response",".","loggable_kwarg_chunks",":","(","List",")","Loggable","chunks","of","kwargs","."]
code: def log_media(
      self, image: Any, loggable_kwarg_chunks: List, idx: int
  ) -> None:
      """Log the generated images, audio, video, etc. from the Diffusion Pipeline's response along with an optional caption to a media panel in the run.
  
      Arguments:
          image: (Any) The generated images, audio, video, etc. from the Diffusion
              Pipeline's response.
          loggable_kwarg_chunks: (List) Loggable chunks of kwargs.
      """
      if (
          "output-type"
          not in SUPPORTED_MULTIMODAL_PIPELINES[self.pipeline_name]
      ):
          try:
              prompt_index = SUPPORTED_MULTIMODAL_PIPELINES[
                  self.pipeline_name
              ]["kwarg-logging"].index("prompt")
              caption = loggable_kwarg_chunks[prompt_index][idx]
          except ValueError:
              caption = None
          wandb.log(
              {"Generated-Image": wandb.Image(image, caption=caption)}
          )
      else:
          if (
              SUPPORTED_MULTIMODAL_PIPELINES[self.pipeline_name][
                  "output-type"
              ]
              == "video"
          ):
              try:
                  prompt_index = SUPPORTED_MULTIMODAL_PIPELINES[
                      self.pipeline_name
                  ]["kwarg-logging"].index("prompt")
                  caption = loggable_kwarg_chunks[prompt_index][idx]
              except ValueError:
                  caption = None
              wandb.log(
                  {
                      "Generated-Video": wandb.Video(
                          postprocess_pils_to_np(image),
                          fps=4,
                          caption=caption,
                      )
                  }
              )
          elif (
              SUPPORTED_MULTIMODAL_PIPELINES[self.pipeline_name][
                  "output-type"
              ]
              == "audio"
          ):
              try:
                  prompt_index = SUPPORTED_MULTIMODAL_PIPELINES[
                      self.pipeline_name
                  ]["kwarg-logging"].index("prompt")
                  caption = loggable_kwarg_chunks[prompt_index][idx]
              except ValueError:
                  caption = None
              wandb.log(
                  {
                      "Generated-Audio": wandb.Audio(
                          image, sample_rate=16000, caption=caption
                      )
                  }
              )
  
file_path: wandb/wandb/integration/diffusers/resolvers/multimodal.py
imports: import logging
  from typing import Any, Dict, List, Sequence
  import wandb
  from wandb.sdk.integration_utils.auto_logging import Response
  from .utils import chunkify, get_updated_kwargs, postprocess_np_arrays_for_video, postprocess_pils_to_np
label_desc: Use image node_id 4 for calling the DiffusersMultiModalPipelineResolver obj's underlying member method code with example usage: obj.log_media(image, loggable_kwarg_chunks, idx) without return types