stable-diffusion-docker
stable-diffusion-docker copied to clipboard
Why based on tensorflow while diffusser is a Pytorch model?
Maybe use another base docker instead of tensorflow(https://github.com/fboulnois/stable-diffusion-docker/blob/2e4a48a3f886171d04016d5083ca930ad9fa9b99/Dockerfile#L1) to enlighten the size of the docker image?
Good question! I was more familiar with the Tensorflow image. I did some investigation with the official pytorch image and here's what I found out:
- I benchmarked both and the performance is about equivalent
- Stable-diffusion using the Pytorch image is 6GB, vs 11.4GB with the Tensorflow image, so you get decent savings
- The Pytorch image uses Ubuntu 18.04, GCC 7.5, Python 3.7.13, and Conda
- The Tensorflow image uses Ubuntu 20.04, GCC 9.4.0, Python 3.8.10, and pip
- I'm not sure how well tested the Pytorch image is, it doesn't have much documentation. On the other hand the Tensorflow image has some documentation, and Google tests against it.
I'm not sure it's worth trading off newer software, ML compatibility, and documentation since disk space is cheap, but I'm open to changing my mind. What do you think?
Why not both?
Why not both?
Simplicity and maintenance cost. I'd rather not have to maintain two Dockerfiles and build script commands even if there only a few changes. Standardizing on one Dockerfile also makes debugging issues easier.
I may revisit this when Pytorch releases new images. Until then, I'm closing this issue.