Skip to content

Import do_pool directly#13

Merged
timenick merged 3 commits into
mainfrom
zhiwang/fix-hf-attribution-sam
Mar 26, 2026
Merged

Import do_pool directly#13
timenick merged 3 commits into
mainfrom
zhiwang/fix-hf-attribution-sam

Conversation

@timenick
Copy link
Copy Markdown
Collaborator

@timenick timenick commented Mar 20, 2026

Summary

  • Replaced with a direct import: from transformers.models.sam2.modeling_sam2 import do_pool

Closes #10

transformers.models.sam2.modeling_sam2.do_pool

Closes #10
@timenick timenick requested a review from a team as a code owner March 20, 2026 07:09
@timenick timenick requested a review from tezheng March 20, 2026 07:10
Import do_pool from transformers internals at call site with try/except
fallback to a local implementation, guarding against future internal
API changes in HuggingFace Transformers.
Comment thread src/winml/modelkit/models/hf/sam.py
@timenick timenick merged commit 4f60333 into main Mar 26, 2026
1 check passed
@timenick timenick deleted the zhiwang/fix-hf-attribution-sam branch March 26, 2026 03:48
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.

Add Apache 2.0 attribution for HuggingFace code in sam.py

2 participants