This project provides an API to generate images in the Blue Archive art style using FastAPI. The API leverages the power of Stable Diffusion and Diffusers to produce high-quality images.
To get started, ensure you have the following Python packages installed:
pip install fastapi[all] diffusers transformers accelerate torch
By default, the project uses the model John6666/baxl-v3-sdxl
. If you wish to use a different model, modify the service.py
file.
scheduler = EulerDiscreteScheduler.from_pretrained("John6666/baxl-v3-sdxl", subfolder="scheduler")
pipeline = DiffusionPipeline.from_pretrained(
"John6666/baxl-v3-sdxl",
scheduler=scheduler,
use_safetensors=True,
# torch_dtype=torch.float16
)
The original model used in this project is derived from BAXL. You can find the link to the model here.
-
Start the FastAPI server:
uvicorn main:app --reload --port 8080
-
Access the API documentation at:
http://127.0.0.1:8080/docs
The API will return the generated image:
- Generate high-quality images in the Blue Archive art style.
- Fully customizable with prompts and other parameters (e.g., resolution, steps, and guidance scale).
- Easily switch between models for different styles or outputs.
Feel free to contribute or report any issues! 🎨