Install
openclaw skills install @slippersheepig/hf-sdxl-imageGenerate an image from a text prompt through the Hugging Face Inference API using stabilityai/stable-diffusion-xl-base-1.0 and the HUGGINGFACE_TOKEN environment variable. Use when the user asks to generate, draw, create, make, or render an image or illustration from text, especially when they mention Hugging Face, SDXL, or Stable Diffusion XL. Save the generated image to a temporary local path, let OpenClaw send it to the current conversation window, and remove the temporary file after successful delivery unless the user explicitly asks to keep a saved copy.
openclaw skills install @slippersheepig/hf-sdxl-imageGenerate a single image from a text prompt with the Hugging Face router endpoint. The skill defaults to stabilityai/stable-diffusion-xl-base-1.0 and can be switched to another compatible Hugging Face Inference API model by setting HF_IMAGE_MODEL.
When you ask to generate an image:
scripts/generate_hf_sdxl.py with the --output /tmp/openclaw/ argument.This skill only generates and saves an image file. It does not define a universal send format.
When returning the image in chat, always follow the current session provider's required outbound media format. Different providers may require different delivery methods, wrappers, or tools. Do not assume that simply reading a local file path, pasting a path, or relying on one provider's auto-routing behavior will work on another provider.
Required behavior:
Examples of what to avoid:
read on an image path will always send the image correctly.Use this skill for requests like:
Default delivery workflow:
python3 scripts/generate_hf_sdxl.py "a cozy cyberpunk alley at night, cinematic lighting" --wait-for-model --output /tmp/openclaw/
With a model override:
HF_IMAGE_MODEL=stabilityai/stable-diffusion-3-medium-diffusers python3 scripts/generate_hf_sdxl.py "a cozy cyberpunk alley at night, cinematic lighting" --wait-for-model --output /tmp/openclaw/
Use a temporary directory for normal chat delivery. Only point --output at a persistent user-chosen location when the user explicitly asks to save or export the image.
--output and saves the generated image to that path or directoryIf the script says Missing HUGGINGFACE_TOKEN environment variable., export the token before running it.
export HUGGINGFACE_TOKEN=hf_xxx
To switch to another compatible Hugging Face Inference API model, set HF_IMAGE_MODEL.
export HF_IMAGE_MODEL=stabilityai/stable-diffusion-3-medium-diffusers
If HF_IMAGE_MODEL is unset, the script uses stabilityai/stable-diffusion-xl-base-1.0.
The token is missing, invalid, expired, or does not have permission for the endpoint.
Retry with --wait-for-model.
Read the full JSON error body and surface it to the user. Do not pretend generation succeeded.
The default policy is temporary-file delivery.
Use this script for deterministic generation and repeatable testing.