Token导航 LogoToken导航TokenDH.com
图像处理敏感数据clawhub未标认证来源可访问clear审计提醒

hf-sdxl-imagehf sdxl 图像

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

9,055

周安装

385

GitHub Stars

公开资料未说明

下载量

3,172
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hf-sdxl-image(hf sdxl 图像)
来源仓库:https://github.com/slippersheepig/hf-sdxl-image
安装命令:
openclaw skills install hf-sdxl-image
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install hf-sdxl-image

简介

hf-sdxl-image 用于辅助图像生成和图片编辑,适合在 OpenClaw 中根据文本生成图片时使用。

  • 适用于视觉素材处理或调用图像模型的场景。
  • 通过 clawhub 安装并使用 openclaw skills install hf-sdxl-image 命令部署。
  • 使用时需确认输入图片、版权来源和输出格式;涉及人物或品牌时应核对授权和合规边界。
  • 建议结合来源仓库和原始 README 文档进一步核验具体用法和功能细节。

SKILL.md

name
hf-sdxl-image
description
Generate 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.

HF SDXL Image

Generate 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.

Chat-oriented workflow

When you ask to generate an image:

  1. Convert your request into a prompt.
  2. Run scripts/generate_hf_sdxl.py with the --output /tmp/openclaw/ argument.
  3. The script saves the image to a temporary path and prints the file path to stdout.
  4. Send the image back through the current conversation provider's required image/file-send format.
  5. After successful delivery, delete the temporary file unless the user explicitly asked to keep it.

Provider-specific delivery rule

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:

  • Detect the current session provider/channel before sending.
  • Use that provider's correct media-send path and syntax.
  • If the provider requires a provider-specific wrapper or message format for images, use it.
  • If the provider does not reliably auto-send images from a local file read, do not rely on that fallback.
  • Treat image delivery as provider-specific, not skill-generic.

Examples of what to avoid:

  • Do not assume read on an image path will always send the image correctly.
  • Do not assume Telegram-style or QQ-style delivery rules apply to other providers.
  • Do not claim success until the image has actually been sent through the current provider's proper format.

Strong trigger examples

Use this skill for requests like:

  • "生成一张图片:夕阳下的海边小镇"
  • "画一张赛博朋克风格的城市夜景"
  • "帮我做一张封面图,主题是 AI 和机器人"
  • "用 Hugging Face 生成一张可爱的熊在图书馆读书"
  • "用 SDXL 出一张未来感海报"
  • "create an illustration of a scholar bear reading in a grand library"

Command

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.

Behavior

  • Sends POST https://router.huggingface.co/hf-inference/models/<model-id>
  • Reads the bearer token from HUGGINGFACE_TOKEN
  • Reads the model id from HF_IMAGE_MODEL when set; otherwise uses stabilityai/stable-diffusion-xl-base-1.0
  • Sends JSON with inputs set to the prompt
  • Requests image output with a single supported Accept header value
  • Requires --output and saves the generated image to that path or directory
  • Prints the saved file path to stdout so OpenClaw can send the file to the current conversation
  • Only generates and stores the image locally; provider-specific outbound delivery must be handled by the caller according to the active chat provider
  • Uses a temporary local file as the standard transport step for reliable delivery
  • Expects OpenClaw to delete temporary files after a successful send
  • Fails loudly when the API returns JSON or an HTTP error

Parameters

  • Positional prompt: image prompt text
  • --output: required output file path or directory; use a temporary directory for normal chat delivery, or a persistent location only when the user explicitly requests a saved file
  • --timeout: HTTP timeout in seconds; defaults to 180
  • --wait-for-model: set options.wait_for_model=true so cold starts wait instead of failing fast

Troubleshooting

Missing token

If the script says Missing HUGGINGFACE_TOKEN environment variable., export the token before running it.

export HUGGINGFACE_TOKEN=hf_xxx

Optional model override

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.

401 or 403

The token is missing, invalid, expired, or does not have permission for the endpoint.

503 or model loading errors

Retry with --wait-for-model.

JSON instead of an image

Read the full JSON error body and surface it to the user. Do not pretend generation succeeded.

Storage policy

The default policy is temporary-file delivery.

  • Generate into a temporary local path for normal chat delivery
  • Return the saved file path so OpenClaw can send the file to the current conversation
  • Delete the temporary file immediately after successful delivery
  • Keep a persistent local copy only when the user explicitly asks for that behavior

Resource

scripts/generate_hf_sdxl.py

Use this script for deterministic generation and repeatable testing.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

74.21%
按下载量换算2,354

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills