kiri-art / docker-diffusers-api

Diffusers / Stable Diffusion in docker with a REST API, supporting various models, pipelines & schedulers.
https://kiri.art/
MIT License
202 stars 94 forks source link

Improve README #6

Closed gadicc closed 1 year ago

gadicc commented 1 year ago

Notes sent by DM and my interim comments:

i. If you encounter a 403 Client Error: Forbidden for url, make sure you have accepted the model license (https://huggingface.co/CompVis/stable-diffusion-v1-4) and specified the correct HF_AUTH_TOKEN in your env.

(Building the docker image took more than 70 minutes on my 16G RAM laptop, maybe you could tell it, great checkpoint to go for a coffee or a walk 😉 ) => downloading all models was a bit painful.

Noted :)

I saw in the readme, "easy to add other models" but can find any documentation, can you point me in the right direction please?

1) For a diffusers model, it's symbol as setting the MODEL_ID var (I'll come back to vars in a sec) and rebuilding. It will download everything you need at build.

2) For a non-diffusers model, as symbol as setting CHECKPOINT_URL (and an arbitrary MODEL_ID to your liking that's used internally but doesn't actually make a difference beyond which directory name is used).

At least, it should be! If not, let me know 🙂

the '2. Variables' is really hard to understand.

1) If you only intend to deploy one repo, ignore all the permutations stuff, and just set the vars in the Dockerfile. (Very soon banana is launching custom build vars, and you won't need to edit the dockerfile at all).

2) If you plan to deploy multiple models, basically what the permute script does is look at the .yaml file which specifies all the different permutations you want and creates a bunch of repos for you (under the permutations dir), where it automatically substited all the vars from the yaml file into those sub-repo Dockerfiles.

Hope that made sense!