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

Add requirements.txt file #1

Merged
merged 1 commit into from Oct 12, 2022
Merged

Add requirements.txt file #1

merged 1 commit into from Oct 12, 2022

Conversation

dpoulopoulos
Copy link
Contributor

Add a requirements.txt file to install the dependencies needed to run the stable_diffusion.ipynb file.

Install the diffusers library from source because of commit 92d70863663662669ee3c376909be1f876e00965 which is needed for fp16 to work.

Refs huggingface/diffusers#769

Signed-off-by: Dimitris Poulopoulos dimpo@arrikto.com

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jph00
Copy link
Member

jph00 commented Oct 11, 2022

Many thanks. Could you please only pin versions where it's required? In general we try to have things run with latest version at all times, not pinned versions.

Also could you please revert your change to the notebook, since on your own env that cell is only required once, not every time you run it

requirements.txt Outdated
Comment on lines 1 to 5
huggingface-hub==0.10.1
transformers==4.23.0
fastcore==1.5.27
fastdownload==0.0.7
git+https://github.com/huggingface/diffusers.git@main#egg=diffusers

Choose a reason for hiding this comment

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

Thanks for this! Just a thought:

This requirements.txt depends on what you are starting with inside your environment.
For example, many things already come on Google Colab (scipy, matplotlib, etc.).
But if someone is setting up a fresh env (Docker, Conda, etc.), then they will need
to install other dependencies like scipy, matplotlib, Jupyter and so on.
As I was setting up a fresh Docker file this evening in order to play
with the first notebook, stable_diffusion, I found I needed to install other packages other than those listed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the entries for fastcore and fastdownload and added one for fastai since it brings both fastcore and fastdownload. Moreover, it brings other necessary libraries, like torch, scipy, and matplotlib. I don't think that installing notebook or jupyterlab is part of this requirements.txt file. You need Jupyter just to be able to open the ipynb file, and you can start from a Jupyter-provided Docker image for this. But, I'm happy to discuss it.

requirements.txt Outdated
transformers==4.23.0
fastcore==1.5.27
fastdownload==0.0.7
git+https://github.com/huggingface/diffusers.git@main#egg=diffusers
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
git+https://github.com/huggingface/diffusers.git@main#egg=diffusers
diffusers

Version 0.4.2 was released a few hours ago, it should work out of the box now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's great. I made the change.

Add a 'requirements.txt' file to install the dependencies needed to run
the 'stable_diffusion.ipynb' file.

Signed-off-by: Dimitris Poulopoulos <dimpo@arrikto.com>
@dpoulopoulos
Copy link
Contributor Author

dpoulopoulos commented Oct 12, 2022

@jph00 I made the changes you asked for and added some more to address the comments by @DrChrisLevy and @pcuenca. I also edited the commit message since we do not install diffusers from source anymore.

@jph00 jph00 merged commit 392e4f4 into fastai:master Oct 12, 2022
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

4 participants