Skip to content

Fix unguarded torchvision import in Cosmos#13321

Merged
DN6 merged 1 commit intomainfrom
cosmos-fix
Mar 24, 2026
Merged

Fix unguarded torchvision import in Cosmos#13321
DN6 merged 1 commit intomainfrom
cosmos-fix

Conversation

@DN6
Copy link
Collaborator

@DN6 DN6 commented Mar 24, 2026

What does this PR do?

Noticed this is resulting in a failure on our PyPi release test because the torchvision import is unguarded
https://github.com/huggingface/diffusers/actions/runs/22723437757/job/65891766459#step:7:408

This PR removes the bare import for torchvision and torchvision.transforms (they're not used anywhere in the pipeline) and guard the torchvision.transforms.functional

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@DN6 DN6 requested a review from sayakpaul March 24, 2026 09:48
@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.

@DN6 DN6 merged commit 62777fa into main Mar 24, 2026
12 checks passed
DN6 added a commit that referenced this pull request Mar 25, 2026
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