code: def test_generative_model_kwargs(self):
      # use musicgen - a generative model
      music_generator = pipeline(
          task="text-to-audio",
          model="facebook/musicgen-small",
          framework="pt",
      )
  
      forward_params = {
          "do_sample": True,
          "max_new_tokens": 250,
      }
  
      # for reproducibility
      set_seed(555)
      outputs = music_generator(
          "This is a test", forward_params=forward_params
      )
      audio = outputs["audio"]
      self.assertEqual(ANY(np.ndarray), audio)
  
      # make sure generate kwargs get priority over forward params
      forward_params = {
          "do_sample": False,
          "max_new_tokens": 250,
      }
      generate_kwargs = {"do_sample": True}
  
      # for reproducibility
      set_seed(555)
      outputs = music_generator(
          "This is a test",
          forward_params=forward_params,
          generate_kwargs=generate_kwargs,
      )
      self.assertListEqual(outputs["audio"].tolist(), audio.tolist())
  
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 6 for calling the TextToAudioPipelineTests obj's underlying member method code with example usage: obj.test_generative_model_kwargs() without return types