code: def test_forward_model_kwargs(self):
      # use vits - a forward model
      speech_generator = pipeline(
          task="text-to-audio",
          model="kakao-enterprise/vits-vctk",
          framework="pt",
      )
  
      # for reproducibility
      set_seed(555)
      outputs = speech_generator(
          "This is a test", forward_params={"speaker_id": 5}
      )
      audio = outputs["audio"]
  
      with self.assertRaises(TypeError):
          # assert error if generate parameter
          outputs = speech_generator(
              "This is a test",
              forward_params={"speaker_id": 5, "do_sample": True},
          )
  
      forward_params = {"speaker_id": 5}
      generate_kwargs = {"do_sample": True}
  
      with self.assertRaises(ValueError):
          # assert error if generate_kwargs with forward-only models
          outputs = speech_generator(
              "This is a test",
              forward_params=forward_params,
              generate_kwargs=generate_kwargs,
          )
      self.assertTrue(np.abs(outputs["audio"] - audio).max() < 1e-5)
  
file_path: transformers/tests/pipelines/test_pipelines_text_to_audio.py
imports: import unittest
  import numpy
  from transformers import MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING, AutoProcessor, TextToAudioPipeline, pipeline
  from transformers.testing_utils import is_pipeline_test, require_torch, require_torch_accelerator, require_torch_or_tf, slow, torch_device
  from transformers.trainer_utils import set_seed
  from .test_pipelines_common import ANY
label_desc: Use image node_id 5 for calling the TextToAudioPipelineTests obj's underlying member method code with example usage: obj.test_forward_model_kwargs() without return types