Open MrLappes opened 1 year ago
Hi @MrLappes I installed your branch. I called the endpoints GET /promptgen/list_models and POST /promptgen/generate Unfortunatelly it just returns RuntimeError: (404, '{"detail":"Not Found"}')
http://localhost:7860/sdapi/v1/promptgen/list_models returns 404
I am running --api parameter when running webui. Is there any missing configuration?
Thanks!
Ah I see what happens... The endpoints of that branch are not defined in
stable-diffusion-webui/modules/api/api.py
So it cannot be called such as http://localhost:7860/sdapi/v1/promptgen/list_models
but
http://localhost:7860/promptgen/list_models
Solved!
Added a new api_generate and a return_available_models function in promptgen.py and added api.py which uses these to get the same behaviour in api as in Webui