搜索

PythonReactSEOPDF
OpenClaw

Flux 2 Flash 图像生成

使用 Flux 2 Flash 模型生成或编辑图像。当用户想要文生图、图像编辑,或提到 flux 2、FLUX.2 时使用此 skill。

hexiaochun0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install hexiaochun/flux2-flash

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Flux 2 Flash 图像生成与编辑

Black Forest Labs 推出的 FLUX.2 [dev] 图像生成和编辑模型,具有增强的写实感、更清晰的文字渲染和原生编辑能力。

可用模型

模型 ID 功能 说明
fal-ai/flux-2/flash 文生图 / 图像编辑 统一入口,根据是否提供图片自动切换模式

自动切换逻辑:

  • 未提供 image_urls → 文生图模式
  • 提供 image_urls → 图像编辑模式

工作流

1. 调用 submit_task

使用 MCP 工具 submit_task 提交任务:

文生图模式(无图片输入):

{
  "model_id": "fal-ai/flux-2/flash",
  "parameters": {
    "prompt": "A beautiful sunset over the ocean with sailboats"
  }
}

图像编辑模式(有图片输入):

{
  "model_id": "fal-ai/flux-2/flash",
  "parameters": {
    "prompt": "Remove the meat from the hamburger",
    "image_urls": ["https://example.com/hamburger.png"]
  }
}
参数说明
参数 类型 必填 默认值 说明
prompt string 是 - 图像生成/编辑提示词
image_urls array 否 - 输入图片 URL 列表(1-4 张),提供时自动切换为编辑模式
image_size string 否 landscape_4_3 图像尺寸预设
num_images integer 否 1 生成图像数量(1-4)
guidance_scale number 否 2.5 引导强度(0-20),控制遵循提示词程度
seed integer 否 - 随机种子,用于复现结果
enable_prompt_expansion boolean 否 false 启用提示词扩展以获得更好的结果
output_format string 否 png 输出图像格式:jpeg, png, webp
enable_safety_checker boolean 否 true 是否启用安全检查
image_size 可选值
  • square_hd - 1024x1024(高清正方形)
  • square - 512x512(标准正方形)
  • portrait_4_3 - 768x1024(竖屏 4:3)
  • portrait_16_9 - 576x1024(竖屏 16:9)
  • landscape_4_3 - 1024x768(横屏 4:3,默认)
  • landscape_16_9 - 1024x576(横屏 16:9)

查询任务状态

提交任务后会返回 task_id,使用 get_task 查询结果:

{
  "task_id": "返回的任务ID"
}

任务状态:

  • pending - 排队中
  • processing - 处理中
  • `...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/hexiaochun/flux2-flash
Version
—
Commit
9d58fc08d2ae0217d401505fc892c156909a882a
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# Flux 2 Flash 图像生成与编辑

Black Forest Labs 推出的 FLUX.2 [dev] 图像生成和编辑模型,具有增强的写实感、更清晰的文字渲染和原生编辑能力。

## 可用模型

| 模型 ID | 功能 | 说明 |
|--------|------|------|
| `fal-ai/flux-2/flash` | 文生图 / 图像编辑 | 统一入口,根据是否提供图片自动切换模式 |

**自动切换逻辑**:
- 未提供 `image_urls` → 文生图模式
- 提供 `image_urls` → 图像编辑模式

## 工作流

### 1. 调用 submit_task

使用 MCP 工具 `submit_task` 提交任务:

**文生图模式**(无图片输入):

```json
{
  "model_id": "fal-ai/flux-2/flash",
  "parameters": {
    "prompt": "A beautiful sunset over the ocean with sailboats"
  }
}
```

**图像编辑模式**(有图片输入):

```json
{
  "model_id": "fal-ai/flux-2/flash",
  "parameters": {
    "prompt": "Remove the meat from the hamburger",
    "image_urls": ["https://example.com/hamburger.png"]
  }
}
```

### 参数说明

| 参数 | 类型 | 必填 | 默认值 | 说明 |
|-----|------|-----|-------|------|
| prompt | string | **是** | - | 图像生成/编辑提示词 |
| image_urls | array | 否 | - | 输入图片 URL 列表(1-4 张),提供时自动切换为编辑模式 |
| image_size | string | 否 | landscape_4_3 | 图像尺寸预设 |
| num_images | integer | 否 | 1 | 生成图像数量(1-4) |
| guidance_scale | number | 否 | 2.5 | 引导强度(0-20),控制遵循提示词程度 |
| seed | integer | 否 | - | 随机种子,用于复现结果 |
| enable_prompt_expansion | boolean | 否 | false | 启用提示词扩展以获得更好的结果 |
| output_format | string | 否 | png | 输出图像格式:jpeg, png, webp |
| enable_safety_checker | boolean | 否 | true | 是否启用安全检查 |

#### image_size 可选值

- `square_hd` - 1024x1024(高清正方形)
- `square` - 512x512(标准正方形)
- `portrait_4_3` - 768x1024(竖屏 4:3)
- `portrait_16_9` - 576x1024(竖屏 16:9)
- `landscape_4_3` - 1024x768(横屏 4:3,默认)
- `landscape_16_9` - 1024x576(横屏 16:9)

## 查询任务状态

提交任务后会返回 `task_id`,使用 `get_task` 查询结果:

```json
{
  "task_id": "返回的任务ID"
}
```

任务状态:
- `pending` - 排队中
- `processing` - 处理中
- `...

相关技能

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.