Skip to content

Remove stale TODO comments in UDOP tied weights - #43477

Merged
Rocketknight1 merged 1 commit into
huggingface:mainfrom
raimbekovm:remove-udop-stale-todo
Jan 26, 2026
Merged

Remove stale TODO comments in UDOP tied weights#43477
Rocketknight1 merged 1 commit into
huggingface:mainfrom
raimbekovm:remove-udop-stale-todo

Conversation

@raimbekovm

Copy link
Copy Markdown
Contributor

Summary

Remove outdated TODO comments claiming patch embedding weight tying is "not working".

Details

Testing confirms the tying mechanism works correctly:

  • patch_embed.proj.weight and encoder.embed_patches.proj.weight share the same tensor
  • Only source weights are saved to state_dict
  • Weight tying is correctly re-established when loading

The TODO was added during #41580 refactor but the mechanism works identically to token embedding tying.

@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: udop

@Rocketknight1 Rocketknight1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, LGTM! (And I'm generally a fan of getting rid of outdated TODOs and open issues because they attract bad code agents)

@Rocketknight1
Rocketknight1 enabled auto-merge (squash) January 26, 2026 13:26
@Rocketknight1
Rocketknight1 merged commit ab87f24 into huggingface:main Jan 26, 2026
20 checks passed
@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.

@raimbekovm

Copy link
Copy Markdown
Contributor Author

lol yeah that happens

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