Install
openclaw skills install ollamadiffuserLocal AI image generation using OllamaDiffuser. Use this skill when Claude needs to generate, edit (img2img/inpaint), or control (ControlNet) images locally using models like FLUX, Stable Diffusion, or GGUF quantized models.
openclaw skills install ollamadiffuserOllamaDiffuser 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.
generate_image MCP tool or the REST API /api/generate.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.
ollamadiffuser pull controlnet-canny-sd15)./api/generate/controlnet.control_image and specify the preprocessor (e.g., "canny").| Use Case | Recommended Model | VRAM | Note |
|---|---|---|---|
| Highest Quality | flux.1-dev | 20GB+ | Requires HF Token |
| Fast & High Quality | flux.1-schnell | 16GB+ | No token needed |
| Budget GPU (6GB) | flux.1-dev-gguf-q4ks | 6GB | GGUF Quantized |
| Ultra Low VRAM | flux.1-dev-gguf-q2k | 3GB | Entry-level |
| Classic/Fast | stable-diffusion-1.5 | 4GB+ | Great for img2img |
| Photorealistic | realvisxl-v4 | 6GB+ | 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.