Skip to content

Change Torchvision functional alias to TVF#43263

Merged
yonigozlan merged 7 commits into
huggingface:mainfrom
yonigozlan:change-tv-functional-alias
Jan 21, 2026
Merged

Change Torchvision functional alias to TVF#43263
yonigozlan merged 7 commits into
huggingface:mainfrom
yonigozlan:change-tv-functional-alias

Conversation

@yonigozlan

Copy link
Copy Markdown
Contributor

Change Torchvision functional alias to TVF in order to avoid conflict (in modular files mostly) where we need both torch.nn.functional , and torchvision.transforms.v2 which are both usually aliased as F.

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@molbap molbap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the modular fix - in terms of clarity I'm not sure about TVF but indeed TF reminds us of a time gone by, and F causes conflicts. vF? visionF? VisFunc?

LGTM regardless!

@yonigozlan

Copy link
Copy Markdown
Contributor Author

vF sounds good to me as well! or tvF, which makes it clear that this is an alias for torchvision

@yonigozlan
yonigozlan enabled auto-merge (squash) January 21, 2026 16:30
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: beit, bridgetower, chameleon, cohere2_vision, conditional_detr, convnext, deepseek_vl, deepseek_vl_hybrid, deformable_detr, depth_pro, detr, dinov3_vit, donut, dpt, efficientloftr, efficientnet

@yonigozlan
yonigozlan merged commit 9a6e8a2 into huggingface:main Jan 21, 2026
25 checks passed
SangbumChoi pushed a commit to SangbumChoi/transformers that referenced this pull request Jan 23, 2026
* cahnge F to TVF

* use import instead of from

* Change TVF to tvF

* nit
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