AI 图像生成:FLUX、Grok 及 50 多种模型 - Openclaw Skills

作者:互联网

2026-03-21

AI教程

什么是 AI 图像生成?

AI 图像生成技能使您的 AI 智能体能够使用包含 50 多种先进模型的庞大库来创建令人惊叹的视觉效果。通过利用 inference.sh 基础设施,该工具在纯文本提示词和专业级资产之间搭建了桥梁,支持从使用 FLUX 进行快速原型设计到使用 Seedream 进行高保真 4K 电影级渲染的一切需求。

将其集成到您的 Openclaw Skills 库中,可确保您的开发环境无需切换上下文即可立即访问尖端的生成式 AI。它通过提供与 Gemini 3 Pro、Grok Imagine 和 Topaz Upscaler 等工具交互的标准方式,简化了管理多个 API 密钥和特定供应商 SDK 的复杂性。

下载入口:https://github.com/openclaw/skills/tree/main/skills/okaris/ai-image-generation

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install ai-image-generation

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 ai-image-generation。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

AI 图像生成 应用场景

  • 为设计演示快速生成专业的产品模型和概念艺术。
  • 使用自然语言提示词创建高保真社交媒体图形和营销视觉效果。
  • 对现有数字资产进行专业级图像放大和增强。
  • 使用 Reve 和 Seedream 等模型在海报和品牌图像中渲染精确的文本。
  • 在大型开发管道中使用 Openclaw Skills 自动化图像生成工作流。
AI 图像生成 工作原理
  1. 用户或智能体使用“生成图像”或特定模型命令等触发词发起图像请求。
  2. 该技能利用 infsh CLI 连接到 inference.sh API,传递提示词和配置参数。
  3. 特定模型(如 FLUX Dev LoRA 或 Grok Imagine)在高性推理服务器上处理输入数据。
  4. 该技能将生成的图像 URL 或原始数据返回到智能体的工作区,以便立即使用或进一步处理。
  5. 生成的资产通过 Openclaw Skills 生态系统进行管理,实现与其他开发工具的无缝集成。

AI 图像生成 配置指南

前提条件

  • 激活的 inference.sh 账户

安装

# 安装 inference.sh CLI
curl -fsSL https://cli.inference.sh | sh && infsh login

# 通过列出可用的图像应用来验证安装
infsh app list --category image

AI 图像生成 数据架构与分类体系

字段 描述 类型
prompt 要生成的图像的文本描述。 字符串
image_url 用于图生图或放大任务的远程源 URL。 URL 字符串
aspect_ratio 输出的尺寸比例(例如 16:9, 1:1, 4:3)。 字符串
input 包含模型特定参数和 LoRA 设置的 JSON 对象。 JSON
output 包含图像链接或处理状态的 JSON 响应。 JSON
name: ai-image-generation
description: "Generate AI images with FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image"
allowed-tools: Bash(infsh *)

AI Image Generation

Generate images with 50+ AI models via inference.sh CLI.

AI Image Generation

Quick Start

# Install CLI
curl -fsSL https://cli.inference.sh | sh && infsh login

# Generate an image with FLUX
infsh app run falai/flux-dev-lora --input '{"prompt": "a cat astronaut in space"}'

Install note: The install script only detects your OS/architecture, downloads the matching binary from dist.inference.sh, and verifies its SHA-256 checksum. No elevated permissions or background processes. Manual install & verification available.

Available Models

Model App ID Best For
FLUX Dev LoRA falai/flux-dev-lora High quality with custom styles
FLUX.2 Klein LoRA falai/flux-2-klein-lora Fast with LoRA support (4B/9B)
Gemini 3 Pro google/gemini-3-pro-image-preview Google's latest
Gemini 2.5 Flash google/gemini-2-5-flash-image Fast Google model
Grok Imagine xai/grok-imagine-image xAI's model, multiple aspects
Seedream 4.5 bytedance/seedream-4-5 2K-4K cinematic quality
Seedream 4.0 bytedance/seedream-4-0 High quality 2K-4K
Seedream 3.0 bytedance/seedream-3-0-t2i Accurate text rendering
Reve falai/reve Natural language editing, text rendering
ImagineArt 1.5 Pro falai/imagine-art-1-5-pro-preview Ultra-high-fidelity 4K
Topaz Upscaler falai/topaz-image-upscaler Professional upscaling

Browse All Image Apps

infsh app list --category image

Examples

Text-to-Image with FLUX

infsh app run falai/flux-dev-lora --input '{
  "prompt": "professional product photo of a coffee mug, studio lighting"
}'

Fast Generation with FLUX Klein

infsh app run falai/flux-2-klein-lora --input '{"prompt": "sunset over mountains"}'

Google Gemini 3 Pro

infsh app run google/gemini-3-pro-image-preview --input '{
  "prompt": "photorealistic landscape with mountains and lake"
}'

Grok Imagine

infsh app run xai/grok-imagine-image --input '{
  "prompt": "cyberpunk city at night",
  "aspect_ratio": "16:9"
}'

Reve (with Text Rendering)

infsh app run falai/reve --input '{
  "prompt": "A poster that says HELLO WORLD in bold letters"
}'

Seedream 4.5 (4K Quality)

infsh app run bytedance/seedream-4-5 --input '{
  "prompt": "cinematic portrait of a woman, golden hour lighting"
}'

Image Upscaling

infsh app run falai/topaz-image-upscaler --input '{"image_url": "https://..."}'

Stitch Multiple Images

infsh app run infsh/stitch-images --input '{
  "images": ["https://img1.jpg", "https://img2.jpg"],
  "direction": "horizontal"
}'
# Full platform skill (all 150+ apps)
npx skills add inference-sh/skills@inference-sh

# FLUX-specific skill
npx skills add inference-sh/skills@flux-image

# Upscaling & enhancement
npx skills add inference-sh/skills@image-upscaling

# Background removal
npx skills add inference-sh/skills@background-removal

# Video generation
npx skills add inference-sh/skills@ai-video-generation

# AI avatars from images
npx skills add inference-sh/skills@ai-avatar-video

Browse all apps: infsh app list

Documentation

  • Running Apps - How to run apps via CLI
  • Image Generation Example - Complete image generation guide
  • Apps Overview - Understanding the app ecosystem