Skip to content

Add HF integration#5

Open
NielsRogge wants to merge 3 commits intoLTH14:mainfrom
NielsRogge:add_hf
Open

Add HF integration#5
NielsRogge wants to merge 3 commits intoLTH14:mainfrom
NielsRogge:add_hf

Conversation

@NielsRogge
Copy link

@NielsRogge NielsRogge commented Feb 27, 2025

This PR makes the model inherit from PyTorchModelHubMixin. This comes with the following benefits:

  • download stats
  • serialization of weights in safetensors
  • automatically inherit from_pretrained and push_to_hub functionalities
  • automatic model card.

Hence models can now be loaded as follows:

from models.fractalgen import FractalGen

model = FractalGen.from_pretrained("nielsr/fractalgen-in64")

The model is here for now: https://huggingface.co/nielsr/fractalgen-in64. It is automatically linked to the paper page (which you can claim as an author).

Demo notebook: https://colab.research.google.com/drive/1yHym8o2SYBUdYnUdPFddMlZBQ3aDd78S?usp=sharing.

Would be great if you could try this out and push all FractalGen models to the 🤗 hub!

Fixes #1

@NielsRogge
Copy link
Author

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.

Release Fractal Generative Models on Hugging Face

1 participant