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: Prepare the loggable dictionary, which is the packed data as a dictionary for logging to wandb, None if an exception occurred.
  
  Arguments:
      response: (wandb.sdk.integration_utils.auto_logging.Response) The response from
          the request.
      kwargs: (Dict[str, Any]) Dictionary of keyword arguments.
  
  Returns:
      Packed data as a dictionary for logging to wandb, None if an exception occurred.
docstr_tok: ["Prepare","the","loggable","dictionary",",","which","is","the","packed","data","as","a","dictionary","for","logging","to","wandb",",","None","if","an","exception","occurred",".","Arguments",":","response",":","(","wandb.sdk.integration_utils.auto_logging.Response",")","The","response","from","the","request",".","kwargs",":","(","Dict","[","str",",","Any","]",")","Dictionary","of","keyword","arguments",".","Returns",":","Packed","data","as","a","dictionary","for","logging","to","wandb",",","None","if","an","exception","occurred","."]
code: def prepare_loggable_dict(
      self, response: Response, kwargs: Dict[str, Any]
  ) -> Dict[str, Any]:
      """Prepare the loggable dictionary, which is the packed data as a dictionary for logging to wandb, None if an exception occurred.
  
      Arguments:
          response: (wandb.sdk.integration_utils.auto_logging.Response) The response from
              the request.
          kwargs: (Dict[str, Any]) Dictionary of keyword arguments.
  
      Returns:
          Packed data as a dictionary for logging to wandb, None if an exception occurred.
      """
      # Unpack the generated images, audio, video, etc. from the Diffusion Pipeline's response.
      images = self.get_output_images(response)
  
      # Account for exception pipelines for text-to-video
      if self.pipeline_name in [
          "TextToVideoSDPipeline",
          "TextToVideoZeroPipeline",
      ]:
          video = postprocess_np_arrays_for_video(
              images,
              normalize=self.pipeline_name == "TextToVideoZeroPipeline",
          )
          wandb.log(
              {
                  "Generated-Video": wandb.Video(
                      video, fps=4, caption=kwargs["prompt"]
                  )
              }
          )
          loggable_kwarg_ids = SUPPORTED_MULTIMODAL_PIPELINES[
              self.pipeline_name
          ]["kwarg-logging"]
          table_row = [
              kwargs[loggable_kwarg_ids[idx]]
              for idx in range(len(loggable_kwarg_ids))
          ]
          table_row.append(wandb.Video(video, fps=4))
          self.wandb_table.add_data(*table_row)
      else:
          loggable_kwarg_ids = SUPPORTED_MULTIMODAL_PIPELINES[
              self.pipeline_name
          ]["kwarg-logging"]
          # chunkify loggable kwargs
          loggable_kwarg_chunks = []
          for loggable_kwarg_id in loggable_kwarg_ids:
              loggable_kwarg_chunks.append(
                  kwargs[loggable_kwarg_id]
                  if isinstance(kwargs[loggable_kwarg_id], list)
                  else [kwargs[loggable_kwarg_id]]
              )
          # chunkify the generated media
          images = chunkify(images, len(loggable_kwarg_chunks[0]))
          for idx in range(len(loggable_kwarg_chunks[0])):
              for image in images[idx]:
                  # Log media to media panel
                  self.log_media(image, loggable_kwarg_chunks, idx)
                  # Populate the row of the wandb_table
                  self.add_data_to_table(
                      image, loggable_kwarg_chunks, idx
                  )
  
      return {"Result-Table": self.wandb_table}
  
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 6 for calling the DiffusersMultiModalPipelineResolver obj's underlying member method code with example usage: obj.prepare_loggable_dict(response, kwargs) and returns: dict