Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ def tse(gt_file_input, text_input, num_infer_steps, eta, seed, guidance_scale, g
|
|
142 |
padding = target_length - current_length
|
143 |
mixture = np.pad(mixture, (0, padding), mode='constant')
|
144 |
mixture = torch.tensor(mixture).unsqueeze(0).to(device)
|
145 |
-
mixture = autoencoder(audio=mixture.unsqueeze(1))
|
146 |
|
147 |
text_inputs = processor(
|
148 |
text=[text_input],
|
@@ -158,7 +158,7 @@ def tse(gt_file_input, text_input, num_infer_steps, eta, seed, guidance_scale, g
|
|
158 |
inputs = {key: value.to(device) for key, value in inputs.items()}
|
159 |
timbre = clapmodel.get_text_features(**inputs)
|
160 |
|
161 |
-
mixture = autoencoder(embedding=mixture).squeeze(1)
|
162 |
# pred = sample_diffusion(mixture, timbre, num_infer_steps, eta, seed, guidance_scale, guidance_rescale)
|
163 |
# return sample_rate, pred.squeeze().cpu().numpy()
|
164 |
return sample_rate, mixture.squeeze().cpu().numpy()
|
|
|
142 |
padding = target_length - current_length
|
143 |
mixture = np.pad(mixture, (0, padding), mode='constant')
|
144 |
mixture = torch.tensor(mixture).unsqueeze(0).to(device)
|
145 |
+
# mixture = autoencoder(audio=mixture.unsqueeze(1))
|
146 |
|
147 |
text_inputs = processor(
|
148 |
text=[text_input],
|
|
|
158 |
inputs = {key: value.to(device) for key, value in inputs.items()}
|
159 |
timbre = clapmodel.get_text_features(**inputs)
|
160 |
|
161 |
+
# mixture = autoencoder(embedding=mixture).squeeze(1)
|
162 |
# pred = sample_diffusion(mixture, timbre, num_infer_steps, eta, seed, guidance_scale, guidance_rescale)
|
163 |
# return sample_rate, pred.squeeze().cpu().numpy()
|
164 |
return sample_rate, mixture.squeeze().cpu().numpy()
|