Skip to content

nicolaschan/flux-http-server

Repository files navigation

Flux HTTP Server

HTTP API for Flux image generation.

Docker

Start the server

docker build -t flux-http-server .
docker run -it \
  -p 8080:8080 \
  -v $HOME/.cache/huggingface:/root/.cache/huggingface \
  --gpus all \
  flux-http-server

Then generate an image

curl -d '{"prompt":"a sign saying hello world"}' localhost:8080/api/batch > batch.json
jq -r '.images[]' batch.json | sed 's/^data:image\/png;base64,//' | awk '{print $0 | "base64 -d > image-" NR ".png"}'

About

HTTP API for Flux image model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages