teticio commited on
Commit
2dddff0
1 Parent(s): 61d4556

resolution as list not tuple, add accelerate to req

Browse files
Files changed (2) hide show
  1. audiodiffusion/__init__.py +3 -3
  2. requirements.txt +1 -0
audiodiffusion/__init__.py CHANGED
@@ -213,11 +213,11 @@ class AudioDiffusionPipeline(DiffusionPipeline):
213
  step_generator = step_generator or generator
214
  # For backwards compatibility
215
  if type(self.unet.sample_size) == int:
216
- self.unet.sample_size = (self.unet.sample_size,
217
- self.unet.sample_size)
218
  if noise is None:
219
  noise = torch.randn(
220
- (batch_size, self.unet.in_channels) + self.unet.sample_size,
221
  generator=generator)
222
  images = noise
223
  mask = None
 
213
  step_generator = step_generator or generator
214
  # For backwards compatibility
215
  if type(self.unet.sample_size) == int:
216
+ self.unet.sample_size = [self.unet.sample_size,
217
+ self.unet.sample_size]
218
  if noise is None:
219
  noise = torch.randn(
220
+ [batch_size, self.unet.in_channels] + self.unet.sample_size,
221
  generator=generator)
222
  images = noise
223
  mask = None
requirements.txt CHANGED
@@ -7,3 +7,4 @@ datasets
7
  gradio
8
  streamlit
9
  tensorboard
 
 
7
  gradio
8
  streamlit
9
  tensorboard
10
+ accelerate