Image generator server is super-easy with stable-diffusion.cpp and Flux-3-image-klein

Wait 5 sec.

I've tried to run my own, local image generator on my GPU in the past. The default solution was of course ComfyUI... I... hate... that... project.. ...from the bottom of my heart! 10GB of bloat gluing together Python, Tensor-flow and some webapp that tries to look like part of the Unreal engine. You have to study for hour(s) just for most simple task. Learn which and how to correctly connect "nodes", and forget it in the next day, because you forgot to save the "workflow" into .json file. What a joke of a project. Did I mention I hate it? Then, when the Flux-3-Image-Klein was released two weeks ago I wanted to try it, just to see if these new "text-to-image" models are any good. Thankfully, somebody mentioned stable-diffusion.cpp in the discussion at https://www.reddit.com/r/LocalLLaMA/comments/1x6s7el/flux3_image_klein_is_now_out/ (thank you so much u/SM8085). With some fiddling and help of LLM we landed on the minimalistic setup that I want to teach you. It is tailored for CUDA (nVidia GPUs), but project supports CPU, ROCM and Vulkan. Just head to theirs releases page and download the archive for your architecture. With CUDA, don't forget to download also cudart-bin archive (CUDA .dlls so you don't need to install full CUDA SDK). Extract everything into some folder and run `sd-server --list-devices` (are you already getting the llama.cpp vibes?). If your GPU is listed without any error, download four more files: ae.safetensors from Flux-3 HF's repo (you'll need HF account to access it) tokenizer.json from that same HF repo finally the model.safetensors you'll also need LLM model for translating your prompt into embeddings - any .gguf from Qwen/Qwen3-VL-4B-Instruct-GGUF will be OK. Download a .mmproj companion if you want "image-to-image" functionality Lastly, create a small runner script, so you don't have to write command-line arguments everytime (place it to the same place as your sd-server.exe) sd-server.exe -v --listen-ip 0.0.0.0 --listen-port 9931 ` --diffusion-model "L:\Black-forest-labs\flux-3-image-klein\model.safetensors" ` --llm "L:\Qwen\Qwen3VL-4B-Instruct-F16.gguf" ` --tokenizer "L:\Black-forest-labs\flux-3-image-klein\tokenizer.json" ` --vae "L:\Black-forest-labs\flux-3-image-klein\ae.safetensors" ` --cfg-scale 1.0 ` --sampling-method euler ` --steps 16 ` --width 1024 --height 1024 That's it! Whole thing is mostly static .exe, .dll and model files. No bloody Python/TensorFlow machinery. And the UI is also like classic chat interface you know from llama-server. Just a few buttons and text input for your prompt. Note: the default seed is a static value of 42. Randomize it for the best results! Huge thanks to the authors of the stable-diffusion.cpp and black-forest-labs 🫶   submitted by   /u/srigi [link]   [comments]