What do you mean by "Set the relevant keys for your deployed models"?

Hey, I am using banana.dev for API and now I am not sure what to set for model key. I also found out that BANANA_MODEL_KEY env var is not used anywhere in frontend source code. I did set BANANA_MODEL_KEY in .env file. Now I am getting an Error: BANANA_MODEL_KEY_SD_v2_0_768 is not a string.
Please help.

1 Like

Hey @kkchauhan, welcome!

Regrettably I have to admit that stable-diffusion-react-nextjs-mui-pwa has been a little neglected, and I hope to have time to clean up the docs and fix a few things later this month.

However, to answer your question - and yes, this isn’t documented anywhere at all - you need to match the banana model key to the appropriate model. So for example, for SDv2.1, we have:

This will be made clearer in a future release, I’ve just been very focused on the docker container the last few months. Thanks for giving things in a shot in the menatime!

ok but where do I use BANANA_MODEL_KEY. I got this key from banana.dev and I think its not used anywhere in your code.

You need that key’s value but you have to give it a different name.

Which model did you deploy on Banana? SDv2.1? In that case, call the environment variable BANANA_MODEL_KEY_SD_v2_1_768 (and set it to the same value as the value of BANANA_MODEL_KEY).

Hope that’s clearer!

I deployed this repo- GitHub - kiri-art/docker-diffusers-api: Diffusers / Stable Diffusion in docker with a REST API, supporting various models, pipelines & schedulers.
I didnt change anything except HF_AUTH_TOKEN.

From main branch? The default there in the Dockerfile line 99 is:

ARG MODEL_ID="stabilityai/stable-diffusion-2"

which is the SDv2.0 768x768 model. So you should call the variable BANANA_MODEL_KEY_SD_v2_0_768 (and make sure to select stabilityai/stable-diffusion-2-1 (“Latest Stable Diffusion, Dec 6th. (768x768)”) from the list of models on the UI before generating your request.

Ok I followed your guide and set BANANA_MODEL_KEY_SD_v2_0_768 as an env var with banana model_key value. Thn I Selected correct Model in UI to generate request and I got this error- FAILED: check endpoint error: callID dereference failed

Ok great! Well, until the error :sweat_smile: Anything else in your node logs, banana logs?

Well No error log in banana but I did get one error while running test.py … Here is the error:
ModuleNotFoundError: No module named ‘einops’
ERROR conda.cli.main_run:execute(47): conda run /bin/bash -c python3 -u server.py failed. (See above for error)

So I added einops in requirements.txt and Redeployed model.

1 Like