@@ -30,9 +30,9 @@ class DanceDiffusionPipeline(DiffusionPipeline):
3030 library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)
3131
3232 Parameters:
33- unet ([`UNet1DModel`]): U-Net architecture to denoise the encoded image .
33+ unet ([`UNet1DModel`]): U-Net architecture to denoise the encoded audio .
3434 scheduler ([`SchedulerMixin`]):
35- A scheduler to be used in combination with `unet` to denoise the encoded image . Can be one of
35+ A scheduler to be used in combination with `unet` to denoise the encoded audio . Can be one of
3636 [`IPNDMScheduler`].
3737 """
3838
@@ -54,7 +54,7 @@ def __call__(
5454 batch_size (`int`, *optional*, defaults to 1):
5555 The number of audio samples to generate.
5656 num_inference_steps (`int`, *optional*, defaults to 50):
57- The number of denoising steps. More denoising steps usually lead to a higher quality audio sample at
57+ The number of denoising steps. More denoising steps usually lead to a higher- quality audio sample at
5858 the expense of slower inference.
5959 generator (`torch.Generator`, *optional*):
6060 One or a list of [torch generator(s)](https://pytorch.org/docs/stable/generated/torch.Generator.html)
@@ -67,7 +67,7 @@ def __call__(
6767
6868 Returns:
6969 [`~pipelines.AudioPipelineOutput`] or `tuple`: [`~pipelines.utils.AudioPipelineOutput`] if `return_dict` is
70- True, otherwise a `tuple. When returning a tuple, the first element is a list with the generated images .
70+ True, otherwise a `tuple` . When returning a tuple, the first element is a list with the generated audio .
7171 """
7272
7373 if audio_length_in_s is None :
@@ -94,7 +94,7 @@ def __call__(
9494 )
9595 sample_size = int (sample_size )
9696
97- dtype = next (iter ( self .unet .parameters () )).dtype
97+ dtype = next (self .unet .parameters ()).dtype
9898 shape = (batch_size , self .unet .config .in_channels , sample_size )
9999 if isinstance (generator , list ) and len (generator ) != batch_size :
100100 raise ValueError (
@@ -112,7 +112,7 @@ def __call__(
112112 # 1. predict noise model_output
113113 model_output = self .unet (audio , t ).sample
114114
115- # 2. compute previous image : x_t -> t_t-1
115+ # 2. compute previous audio sample : x_t -> t_t-1
116116 audio = self .scheduler .step (model_output , t , audio ).prev_sample
117117
118118 audio = audio .clamp (- 1 , 1 ).float ().cpu ().numpy ()
0 commit comments