Skip to content

Commit 6740db2

Browse files
committed
fix(core): fix Model.example_output for embedding models
1 parent 610fd8b commit 6740db2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyannote/audio/core/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,13 @@ def __example_output(
198198
example_output: torch.Tensor,
199199
specifications: Specifications = None,
200200
) -> Output:
201-
_, num_frames, dimension = example_output.shape
202-
203201
if specifications.resolution == Resolution.FRAME:
202+
_, num_frames, dimension = example_output.shape
204203
frame_duration = specifications.duration / num_frames
205204
frames = SlidingWindow(step=frame_duration, duration=frame_duration)
206205
else:
206+
_, dimension = example_output.shape
207+
num_frames = None
207208
frames = None
208209

209210
return Output(

0 commit comments

Comments
 (0)