Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure Hugging Face download stats work, better discoverability #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NielsRogge
Copy link

@NielsRogge NielsRogge commented Jan 13, 2025

Hi @vsehwag-sony,

Thanks for this nice work! Great to see the models being released on the hub :)

This PR proposes to improve the 🤗 integration by leveraging the PyTorchModelHubMixin class. This allows:

  • to automatically load the various DiT models using from_pretrained (and push them using push_to_hub)
  • better discoverability using the text-to-image tag
  • track download numbers for your models (similar to models in the Transformers library)
  • use safetensors instead of pickle for weights serialization
  • have nice model cards on a per-model basis.

Usage is as follows:

from micro_diffusion.models.dit import DiT

model = DiT.from_pretrained("sony/MicroDiT-16-channel")

See also the push_and_load_from_hf.py script.

Would you be interested in this integration?

Kind regards,

Niels

@NielsRogge
Copy link
Author

Hi @vsehwag-sony is this something that interests you?

@NielsRogge
Copy link
Author

HI @vsehwag-sony I guess I can close this PR?

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.

None yet

1 participant