Giter Club home page Giter Club logo

Comments (9)

kuprel avatar kuprel commented on August 22, 2024 2

I added the package to PyPI and now the entire setup process is pip install min-dalle. The model parameters are downloaded as needed with just the requests library. Thanks for the suggestions. I should probably also add a flag for verbose to prevent the print statements

from min-dalle.

kuprel avatar kuprel commented on August 22, 2024 1

The colab now runs purely in torch and downloads pre-converted pytorch parameters from the HF hub. Saves a lot of time.

from min-dalle.

w4ffl35 avatar w4ffl35 commented on August 22, 2024 1

awesome thank you for doing this @kuprel

from min-dalle.

davidmezzetti avatar davidmezzetti commented on August 22, 2024 1

This is great! Thank you for doing this. I also see the verbose flag now. I'll close this issue.

I've used your work for an example notebook that generates an image from a webpage summary. You can see it here. Thanks again for creating this library!

https://colab.research.google.com/github/neuml/txtai/blob/master/examples/35_Pictures_are_worth_a_thousand_words.ipynb
https://dev.to/neuml/pictures-are-a-worth-a-thousand-words-144k

from min-dalle.

kuprel avatar kuprel commented on August 22, 2024 1

Wow that's really cool

from min-dalle.

kuprel avatar kuprel commented on August 22, 2024

Thanks! I like your idea of uploading the pt files to the HF hub, doing that now. It will save a lot of time converting from flax and get rid of a lot of ugly conversion code. Will look into the PyPI install

from min-dalle.

davidmezzetti avatar davidmezzetti commented on August 22, 2024

Sounds great!

I could see it where the default install_requires only needs torch and huggingface-hub. You could add optional dependencies for flax. That way if someone just wants to use the torch models, they only need torch installed.

from min-dalle.

davidmezzetti avatar davidmezzetti commented on August 22, 2024

That's great! Definitely seems simpler now.

If you wanted to programmatically download models vs depending on running curl you could add the huggingface_hub library and do something like this:

from huggingface_hub import hf_hub_url, cached_download

config_file_url = hf_hub_url("kuprel/min-dalle", filename="vocab.json")
cached_download(config_file_url)

https://huggingface.co/docs/huggingface_hub/how-to-downstream

This would also open up option to parameterize the model loaded (defaulting to yours) and let someone load an alternative model.

Could also consider having two hf model projects, one for mini and one for mega.

from min-dalle.

davidmezzetti avatar davidmezzetti commented on August 22, 2024

Thanks. Good luck with this project, looking forward to seeing it grow!

from min-dalle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.