class_docstr: Resolver for  request and responses from [`diffusers.StableDiffusionXLPipeline`](https://huggingface.co/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_xl#stable-diffusion-xl) multi-modal Diffusion Pipelines, providing necessary data transformations, formatting, and logging.
  
  Arguments:
      pipeline_name: (str) The name of the Diffusion Pipeline.
docstr: Prepare the loggable dictionary for text-to-image workflow.
  
  Arguments:
      pipeline: (Any) The Diffusion Pipeline.
      workflow_stage: (str) The name of the workflow stage.
      response: (wandb.sdk.integration_utils.auto_logging.Response) The response from
          the request.
      kwargs: (Dict[str, Any]) Dictionary of keyword arguments.
docstr_tok: ["Prepare","the","loggable","dictionary","for","text-to-image","workflow",".","Arguments",":","pipeline",":","(","Any",")","The","Diffusion","Pipeline",".","workflow_stage",":","(","str",")","The","name","of","the","workflow","stage",".","response",":","(","wandb.sdk.integration_utils.auto_logging.Response",")","The","response","from","the","request",".","kwargs",":","(","Dict","[","str",",","Any","]",")","Dictionary","of","keyword","arguments","."]
code: def prepare_loggable_dict_for_text_to_image(
      self,
      pipeline: Any,
      workflow_stage: str,
      response: Response,
      kwargs: Dict[str, Any],
  ) -> Dict[str, Any]:
      """Prepare the loggable dictionary for text-to-image workflow.
  
      Arguments:
          pipeline: (Any) The Diffusion Pipeline.
          workflow_stage: (str) The name of the workflow stage.
          response: (wandb.sdk.integration_utils.auto_logging.Response) The response from
              the request.
          kwargs: (Dict[str, Any]) Dictionary of keyword arguments.
  
      """
      prompt_logging = (
          kwargs["prompt"]
          if isinstance(kwargs["prompt"], list)
          else [kwargs["prompt"]]
      )
      prompt2_logging = (
          kwargs["prompt_2"]
          if isinstance(kwargs["prompt_2"], list)
          else [kwargs["prompt_2"]]
      )
      negative_prompt_logging = (
          kwargs["negative_prompt"]
          if isinstance(kwargs["negative_prompt"], list)
          else [kwargs["negative_prompt"]]
      )
      negative_prompt2_logging = (
          kwargs["negative_prompt_2"]
          if isinstance(kwargs["negative_prompt_2"], list)
          else [kwargs["negative_prompt_2"]]
      )
      images = (
          decode_sdxl_t2i_latents(pipeline, response.images)
          if kwargs["output_type"] == "latent"
          else response.images
      )
      images = chunkify(images, len(prompt_logging))
      for idx in range(len(prompt_logging)):
          for image in images[idx]:
              wandb.log(
                  {
                      f"Generated-Image/{workflow_stage}": wandb.Image(
                          image,
                          caption=f"Prompt-1: {prompt_logging[idx]}\nPrompt-2: {prompt2_logging[idx]}",
                      )
                  }
              )
              self.wandb_table.add_data(
                  workflow_stage,
                  prompt_logging[idx]
                  if prompt_logging[idx] is not None
                  else "",
                  negative_prompt_logging[idx]
                  if negative_prompt_logging[idx] is not None
                  else "",
                  prompt2_logging[idx]
                  if prompt2_logging[idx] is not None
                  else "",
                  negative_prompt2_logging[idx]
                  if negative_prompt2_logging[idx] is not None
                  else "",
                  wandb.Image(image),
              )
  
file_path: wandb/wandb/integration/diffusers/resolvers/sdxl.py
imports: import logging
  from typing import TYPE_CHECKING, Any, Dict, List, Sequence
  import wandb
  from wandb.sdk.integration_utils.auto_logging import Response
  from wandb.util import get_module
  from .utils import chunkify, get_updated_kwargs
label_desc: Use image node_id 4 for calling the SDXLResolver obj's underlying member method code with example usage: obj.prepare_loggable_dict_for_text_to_image(pipeline, workflow_stage, response, kwargs) without return types