返回顶部
s

seedream-img-genSeedream图像生成

This skill should be used when the user wants to generate images using Seedream, the image generation model from ByteDance on Volcengine platform. Triggers include requests like 用Seedream生成图片, seedream画图, generate image with seedream, 调用seedream, 用豆包画图, or any request to create, draw, or generate images via the Seedream API.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
98
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

seedream-img-gen

Seedream 图片生成技能

概述

本技能帮助通过火山引擎方舟平台(Volcengine Ark)的 Seedream 系列模型生成图片,支持文生图(text-to-image)和图生图(image-to-image,Seedream 4.0+)。



前置条件

  1. 1. 获取 API Key:前往 https://console.volcengine.com/ark 注册并获取 ARKAPIKEY
  2. 开通模型:在方舟平台「开通管理」页面开通所需模型
  3. 安装依赖(二选一):
- 官方 SDK:pip install volcengine-python-sdk[ark] - OpenAI 兼容:pip install openai

核心工作流

1. 收集必要信息

在生成图片前,需要明确:

  • - 提示词(prompt):图片内容描述,支持中英文
  • 模型选择:默认使用 doubao-seedream-3-0-t2i-250415(详细模型列表见 references/api_reference.md)
  • 图片尺寸(可选):如 1024x1024、1792x1024
  • 输出路径(可选):保存图片的本地路径

如果用户未明确提到模型,默认使用 Seedream 4.0(doubao-seedream-4-0-250828)。

2. 检查环境

要验证环境是否就绪,运行:
bash
echo $ARKAPIKEY

如果 API 密钥缺失,指导用户进行设置:
bash
export ARKAPIKEY=yourapikey_here

3. 调用生成脚本

使用附带的脚本 scripts/generate_image.py:

bash

基本用法(文生图)


python3 ~/.workbuddy/skills/seedream-image-gen/scripts/generate_image.py \
--prompt 一只可爱的橘猫坐在窗边看夕阳,写实摄影风格 \
--output output.png

指定模型

python3 ~/.workbuddy/skills/seedream-image-gen/scripts/generate_image.py \ --prompt a cyberpunk city at night \ --model doubao-seedream-4-0-250828 \ --output output.png

指定尺寸

python3 ~/.workbuddy/skills/seedream-image-gen/scripts/generate_image.py \ --prompt 横版风景画,超宽屏 \ --size 1792x1024 \ --output landscape.png

生成多张

python3 ~/.workbuddy/skills/seedream-image-gen/scripts/generate_image.py \ --prompt 卡通风格的小动物 \ --n 4 \ --output animals.png

使用 OpenAI 兼容模式

python3 ~/.workbuddy/skills/seedream-image-gen/scripts/generate_image.py \ --prompt 描述内容 \ --sdk openai \ --output result.png

4. 处理结果

  • - 脚本成功执行后会输出图片保存路径
  • 生成的图片默认保存到当前工作目录,也可通过 --output 指定
  • 使用 url 格式时,脚本会自动下载图片到本地

快速内联调用(不使用脚本)

如果希望直接生成代码调用,可用以下模板:

python
import os
from volcenginesdkarkruntime import Ark

client = Ark(apikey=os.environ.get(ARKAPI_KEY))
resp = client.images.generate(
model=doubao-seedream-3-0-t2i-250415,
prompt=YOURPROMPTHERE,
response_format=url,
)

url = resp.data[0].url
print(图片 URL:, url)

下载图片

import urllib.request urllib.request.urlretrieve(url, output.png) print(已保存至 output.png)

模型选择建议

场景推荐模型
通用文生图,快速稳定doubao-seedream-3-0-t2i-250415
高质量图片,支持参考图
doubao-seedream-4-0-250828 | | 最新最强效果 | doubao-seedream-4-5-251128 | | 极速轻量 | doubao-seedream-5-0-lite |

参考资源

  • - 详细 API 参数和代码示例:references/apireference.md
  • 生成脚本(支持命令行调用):scripts/generateimage.py
  • 官方文档:https://www.volcengine.com/docs/82379

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 seedream-img-gen-1776012188 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 seedream-img-gen-1776012188 技能

通过命令行安装

skillhub install seedream-img-gen-1776012188

下载

⬇ 下载 seedream-img-gen v1.0.0(免费)

文件大小: 6.45 KB | 发布时间: 2026-4-13 11:54

v1.0.0 最新 2026-4-13 11:54
Seedream image generation skill initial release:

- Enables image creation using Seedream models on Volcengine Ark (ByteDance).
- Supports both text-to-image and image-to-image generation (Seedream 4.0+).
- Provides guidance for API key setup, environment configuration, and script usage.
- Includes inline Python code and command-line examples for flexible integration.
- Offers model selection advice for different scenarios.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部