Skip to content

Conversation

NicolasHug
Copy link
Contributor

@NicolasHug NicolasHug commented Sep 8, 2025

Closes #877

decoder.get_frames_at(indices) was implicitly accepting tensor indices before https://github.com/pytorch/torchcodec/pull/746/files#diff-4f95b28922233b6ec6f41a7264a5518af7ea7dfb11329b133d378f9701e3cad0L224-L227 .

The type annotation clearly mentions list[int] but passing a tensor was previously working, and some users are already depending on this behavior: the nightlies are currently breaking transformers as reported in #877.

To avoid breaking users in our next release, this PR re-enables tensor support in a non-optimal way. I am opening #879 to follow-up on this so we can officially and properly support tensors.

@NicolasHug NicolasHug merged commit c2e202d into meta-pytorch:main Sep 8, 2025
47 checks passed
@NicolasHug NicolasHug deleted the tensor_support branch September 8, 2025 13:01
NicolasHug added a commit to NicolasHug/torchcodec that referenced this pull request Sep 8, 2025
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.

Some transformers tests fails with torchcodec==0.7.0.dev but pass with 0.6.0+cu126
2 participants