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

Leverage deepspeed for significantly faster inference #180

Open
LifeIsStrange opened this issue Sep 4, 2022 · 1 comment
Open

Leverage deepspeed for significantly faster inference #180

LifeIsStrange opened this issue Sep 4, 2022 · 1 comment

Comments

@LifeIsStrange
Copy link

https://github.com/microsoft/DeepSpeed
Deepspeed is a state of the art library that enable out of the box many optimizations for inference.
While especially good for clusters, I believe it can bring optimizations to single GPUs too.

colemickens pushed a commit to colemickens/stable-diffusion that referenced this issue Sep 15, 2022
* Add simple templating

* Little grid generation image fix

* Add new grid help to readme

* Grid image generation fixes

* Trim @ symbol if no matrix inputs

* Resolve conflicts
@goldfish1974
Copy link

I believe DeepSpeed is supported by HuggingFace Accelerate. (https://huggingface.co/docs/accelerate/usage_guides/fsdp and https://huggingface.co/docs/accelerate/usage_guides/deepspeed)

The same docs also talks about how you can shard the training and inference so that you can use a) less GPU resources and/or b) Multiple GPUs.

This would open up a lot more people to be able to perform training which appears to be a limiting factor as the lowest GPU VRAM I've seen training on is around 10GB (Down from 24GB).

I feel that a lot of value would be added by reducing the VRAM requirements (offset against training speed) out in the Stable Diffusion public community.

Please consider this issue as it seems the implementation should be fairly simple as it can apparently be implemented with only a few lines of code changes and a matching configuration file.

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

No branches or pull requests

2 participants