Skip to content

Fix: Predicted spans NOT being used for anchor conditioning when predict_spans=True#100

Merged
chevalierNoir merged 2 commits into
facebookresearch:mainfrom
adhiraj2001:fix-span-pred
May 26, 2026
Merged

Fix: Predicted spans NOT being used for anchor conditioning when predict_spans=True#100
chevalierNoir merged 2 commits into
facebookresearch:mainfrom
adhiraj2001:fix-span-pred

Conversation

@adhiraj2001
Copy link
Copy Markdown
Contributor

Description

This fixes stale anchor conditioning when predict_spans=True.

Currently, SAMAudio.separate() populates forward_args before predict_spans() is executed.
If no anchors are initially provided in the batch, forward_args retains None or empty tensors for anchor_ids and anchor_alignment.

However, predict_spans() mutates the batch by adding predicted anchors through batch.process_anchors(...), while forward_args is never updated afterward.

As a result, the inference continues without any anchor conditioning, ignoring the predicted spans entirely.

Change

After automatic span prediction, refresh:

  • forward_args["anchor_ids"]
  • forward_args["anchor_alignment"]

using the updated batch values and the existing reranking repeat helper.

Notes

I believe this is a significant bug, as it considerably affects output reliability, which is a key aspect highlighted in the paper.

predict_spans() mutates batch.anchor_ids / batch.anchor_alignment.
Refresh the cached forward args so the ODE uses predicted temporal
anchors.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 24, 2026
@chevalierNoir chevalierNoir self-requested a review May 26, 2026 05:09
@chevalierNoir chevalierNoir merged commit bb4c699 into facebookresearch:main May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants