OllamaDiffuser is a local AI image generation tool that provides an Ollama-like experience for Stable Diffusion and FLUX models. It can be interfaced via CLI, REST API, or MCP.
If the tool is not yet installed or needs specific hardware support, use these commands:
pip install ollamadiffuserpip install "ollamadiffuser[full]"pip install "ollamadiffuser[gguf]"pip install "ollamadiffuser[mcp]"CMAKE_ARGS="-DSD_METAL=ON" pip install stable-diffusion-cpp-pythonAuthentication: Gated models (e.g., FLUX.1-dev, SD 3.5) require a Hugging Face token.
export HF_TOKEN=your_token_here (Add to .bashrc or .zshrc for persistence).Generate an image from a text prompt.
Tool/Command: Use the generate_image MCP tool or the REST API /api/generate.
Key Parameters:
prompt: Detailed description of the image.width / height: Default is usually 1024x1024 for SDXL/FLUX, 512x512 for SD1.5.seed: Optional for reproducibility.response_format: Set to b64_json for agent-friendly base64 responses.Manage which models are downloaded and active in VRAM.
list_models to see installed versions.ollamadiffuser pull <model-name> via shell.load_model to switch active models in memory.ollamadiffuser recommend to find models that fit the available GPU VRAM.Modify existing images.
/api/generate/img2img. Requires image (file/base64) and strength (0.0-1.0; lower = closer to original)./api/generate/inpaint. Requires image and a mask image.Use structural guides (Canny, Depth, OpenPose) for precise control.
Workflow:
ollamadiffuser pull controlnet-canny-sd15)./api/generate/controlnet.control_image and specify the preprocessor (e.g., "canny").Use CaseRecommended ModelVRAMNoteHighest Qualityflux.1-dev20GB+Requires HF TokenFast & High Qualityflux.1-schnell16GB+No token neededBudget GPU (6GB)flux.1-dev-gguf-q4ks6GBGGUF QuantizedUltra Low VRAMflux.1-dev-gguf-q2k3GBEntry-levelClassic/Faststable-diffusion-1.54GB+Great for img2imgPhotorealisticrealvisxl-v46GB+SDXL based
http://localhost:8000http://localhost:8001 (Start with ollamadiffuser --mode ui)export HF_TOKEN=your_token.pip install "ollamadiffuser[gguf]" for memory-efficient runs.