# agic-api-queue-server **Repository Path**: py-service/agic-api-queue-server ## Basic Information - **Project Name**: agic-api-queue-server - **Description**: No description available - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-08 - **Last Updated**: 2025-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Problem of stable diffusion webui Stable diffusion webui provides a powerful tool for AI image generation. However, the webui api has some limitations: 1. a blocking REST api call, which might take more than 30s to return the final value. Most gateways don't allow such long blocking time on api call. 2. webui api is a single thread process. Once the thread is occupied, other webui api will fail. (Even though there is a multi thread mode in stable diffusion webui) This repo is aiming to solve the above problems. ## Preconditions: - Python 3 - Stable diffusion Webui ## Inspired by the project https://github.com/marciovrl/fastapi-example.git ## Run local ### Before run this project, please make sure you launched the stable diffusion webui api. ### Install dependencies ``` pip install -r requirements.txt ``` ### Run server ``` uvicorn app.main:app --reload --port 5001 ``` ## API documentation (provided by Swagger UI) ``` http://127.0.0.1:8000/docs ``` ## Model swtich There is an extra filed in txt2img/img2img api: options: Optional[dict] You can swtich stable diffusion by using this options. ``` "options": { "sd_model_checkpoint": } ```