feat(backend): add stablediffusion-ggml by mudler · Pull Request #4289 · mudler/LocalAI (original) (raw)

Description

This PR is a first attempt into adding a very straightforward backend for stablediffusion.cpp (https://github.com/leejet/stable-diffusion.cpp which is using ggml-based engine). Part of #1126

To test it:

name: sd-ggml backend: stablediffusion-ggml parameters: model: huggingface://city96/FLUX.1-dev-gguf/flux1-dev-Q2_K.gguf

options:

step: 25

download_files:

curl http://localhost:8080/v1/images/generations -H "Content-Type: application/json" -d '{ "prompt": "A cute baby sea otter", "model": "sd-ggml", "size": "256x256" }'

Notes for Reviewers

It does not wire up all the options available to stablediffusion.cpp, the purpose of this PR is to introduce the backend first, optimizations are left as an exercise for later.

Signed commits