Skip to content

Commit 63798ba

Browse files
committed
Try suggestions from torch.export error logs
1 parent 8202d2e commit 63798ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extension/audio/mel_spectrogram.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ def export_processor():
180180
chunk_tensor = audio_tensor[:93680]
181181
with torch.no_grad():
182182
# dim = Dim("waveform", min=1600, max=4800000) # 10 chunks max
183+
_waveform = Dim('_waveform', min=1, max=10)
184+
waveform = 480000*_waveform - 386320
183185
ep: ExportedProgram = torch.export.export(
184-
model, (chunk_tensor,), dynamic_shapes={"waveform": {0: Dim.AUTO}}, strict=True
186+
model, (chunk_tensor,), dynamic_shapes={"waveform": {0: waveform}}, strict=True
185187
)
186188
# logging.debug(ep)
187189

0 commit comments

Comments
 (0)