Skip to content

Conversation

remi-or
Copy link
Collaborator

@remi-or remi-or commented Sep 1, 2025

Some tests are failing on the AMD CI (like in this run) because of torchcodec with the follwing error:

FAILED tests/models/internvl/test_processing_internvl.py::InternVLProcessorTest::test_apply_chat_template_video_frame_sampling - RuntimeError: torchcodec_ns::get_frames_at_indices() Expected a value of type 'List[int]' for argument 'frame_indices' but instead found type 'Tensor'.
Position: 1
Value: tensor([ 50, 150, 250], dtype=torch.int32)
Declaration: torchcodec_ns::get_frames_at_indices(Tensor(a!) decoder, *, int[] frame_indices) -> (Tensor, Tensor, Tensor)
Cast error details: Unable to cast Python instance of type <class 'torch.Tensor'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)

and pining torchcodec version to 0.5 in the docker, instead of the current 0.4, fixes this. Tested 0.6 as well and it did not work.

@remi-or remi-or requested a review from ydshieh September 1, 2025 15:57
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure.

I remember that we have to the correct pair of torch and torchcodec.

For example, torch 2.8 with torchcodec 0.6, and torch 2.7 with torchcodec 0.5

Guess you checked this .

@remi-or
Copy link
Collaborator Author

remi-or commented Sep 1, 2025

This was probably the issue! In the new container, we have

torchaudio                2.7.1+rocm6.4.1.git95c61b41
torchcodec                0.5
torchvision               0.22.1+rocm6.4.1.git59a3e1f9

so it means we used to have torch==2.7.1 with torchcodec==0.4. Hopefully results come back green on tonight's CI.

@remi-or remi-or merged commit b365550 into huggingface:main Sep 1, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants