teticio commited on
Commit
08c6681
1 Parent(s): da20094

update for latest version of diffusers

Browse files
Files changed (1) hide show
  1. audiodiffusion/__init__.py +2 -2
audiodiffusion/__init__.py CHANGED
@@ -119,7 +119,7 @@ class AudioDiffusion:
119
  if start_step > 0:
120
  images[0, 0] = scheduler.add_noise(
121
  torch.tensor(input_image[np.newaxis, np.newaxis, :]),
122
- noise, steps - start_step)
123
 
124
  mask_start = int(mask_start_secs * self.mel.get_sample_rate() /
125
  self.mel.hop_length)
@@ -127,7 +127,7 @@ class AudioDiffusion:
127
  self.mel.hop_length)
128
  mask = scheduler.add_noise(
129
  torch.tensor(input_image[np.newaxis, np.newaxis, :]), noise,
130
- scheduler.timesteps[start_step:])
131
 
132
  images = images.to(self.ddpm.device)
133
  for step, t in enumerate(
 
119
  if start_step > 0:
120
  images[0, 0] = scheduler.add_noise(
121
  torch.tensor(input_image[np.newaxis, np.newaxis, :]),
122
+ noise, torch.tensor(steps - start_step))
123
 
124
  mask_start = int(mask_start_secs * self.mel.get_sample_rate() /
125
  self.mel.hop_length)
 
127
  self.mel.hop_length)
128
  mask = scheduler.add_noise(
129
  torch.tensor(input_image[np.newaxis, np.newaxis, :]), noise,
130
+ torch.tensor(scheduler.timesteps[start_step:]))
131
 
132
  images = images.to(self.ddpm.device)
133
  for step, t in enumerate(