code: def test_kandinsky_text2img(self):
      expected_image = load_numpy(
          "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
          "/kandinskyv22/kandinskyv22_text2img_cat_fp16.npy"
      )
  
      pipe_prior = KandinskyV22PriorPipeline.from_pretrained(
          "kandinsky-community/kandinsky-2-2-prior",
          torch_dtype=torch.float16,
      )
      pipe_prior.to(torch_device)
  
      pipeline = KandinskyV22Pipeline.from_pretrained(
          "kandinsky-community/kandinsky-2-2-decoder",
          torch_dtype=torch.float16,
      )
      pipeline = pipeline.to(torch_device)
      pipeline.set_progress_bar_config(disable=None)
  
      prompt = "red cat, 4k photo"
  
      generator = torch.Generator(device="cuda").manual_seed(0)
      image_emb, zero_image_emb = pipe_prior(
          prompt,
          generator=generator,
          num_inference_steps=5,
          negative_prompt="",
      ).to_tuple()
  
      generator = torch.Generator(device="cuda").manual_seed(0)
      output = pipeline(
          image_embeds=image_emb,
          negative_image_embeds=zero_image_emb,
          generator=generator,
          num_inference_steps=100,
          output_type="np",
      )
  
      image = output.images[0]
  
      assert image.shape == (512, 512, 3)
  
      assert_mean_pixel_difference(image, expected_image)
  
imports: import gc
  import random
  import unittest
  import numpy
  import torch
  from diffusers import DDIMScheduler, KandinskyV22Pipeline, KandinskyV22PriorPipeline, UNet2DConditionModel, VQModel
  from diffusers.utils.testing_utils import enable_full_determinism, floats_tensor, load_numpy, require_torch_gpu, slow, torch_device
  from ..test_pipelines_common import PipelineTesterMixin, assert_mean_pixel_difference
label_desc: Use image node_id 2 for calling the KandinskyV22PipelineIntegrationTests obj's underlying member method code with example usage: obj.test_kandinsky_text2img() without return types