Update image-generation.md

Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
Ettore Di Giacinto
2025-08-20 10:37:11 +02:00
committed by GitHub
parent 8193d18c7c
commit c899e90277

View File

@@ -262,6 +262,27 @@ IMAGE_PATH=/path/to/your/image
curl -H "Content-Type: application/json" -d @- http://localhost:8080/v1/images/generations
```
##### 🖼️ Flux kontext with `stable-diffusion.cpp`
LocalAI supports Flux Kontext and can be used to edit images via the API:
Install with:
```local-ai run flux.1-kontext-dev```
To test:
```
curl http://localhost:8080/v1/images/generations -H "Content-Type: application/json" -d '{
"model": "flux.1-kontext-dev",
"prompt": "change 'flux.cpp' to 'LocalAI'",
"size": "256x256",
"ref_images": [
"https://raw.githubusercontent.com/leejet/stable-diffusion.cpp/master/assets/flux/flux1-dev-q8_0.png"
]
}'
```
#### Depth to Image
https://huggingface.co/docs/diffusers/using-diffusers/depth2img