TypeError: __call__() got an unexpected keyword argument 'transcript'
Description:
I encountered a 'TypeError' while running the code snippet below. It seems like the 'transcript' argument is not recognized, although it's listed as a valid argument in the documentation. Can someone please help me understand why this error is occurring and how to resolve it?
import scipy
import torch
from diffusers import AudioLDM2Pipeline
repo_id = "anhnct/audioldm2_gigaspeech"
pipe = AudioLDM2Pipeline.from_pretrained(repo_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
# define the prompts
prompt = "An female actor say with angry voice"
transcript= "hi, i am yeong min. nice to meet you"
negative_prompt = "low quality"
# set the seed for generator
generator = torch.Generator("cuda").manual_seed(1)
# run the generation
audio = pipe(
prompt,
negative_prompt=negative_prompt,
transcription=transcript,
num_inference_steps=200,
audio_length_in_s=8.0,
num_waveforms_per_prompt=1,
generator=generator,
max_new_tokens=512
).audios
# save the best audio sample (index 0) as a .wav file
scipy.io.wavfile.write("introduce.wav", rate=16000, data=audio[0])
Error Message:
TypeError: __call__() got an unexpected keyword argument 'transcription'
Environment:
- Python version: 3.9
- Operating system: Linux
- Hardware acceleration (if relevant): CUDA version 12.2
hi, what version diffusers do you use ?
I am using 0.27.2 version
>>> import diffusers
>>> diffusers.__version__
'0.27.2'
>>>
Despite downgrading to version '0.21.0' of diffusers, I'm still encountering the same TypeError as before.
I think you need to install Diffusers from source as this feature is not updated yet. Please wait for Diffusers updates to install with pip
Sorry, you told me to install Diffusers from the source, but I didn't understand what this meant
How can I install it from a source? Is there a yaml file or a requirements.txt file?
I was able to solve the problem following your advice. I appreciate it.