返回 Skills 列表
🎨

IMA Image Generation

Text-to-image & image-to-image with SeeDream 4.5, Midjourney, Nano Banana 2/Pro. Supports 1K/2K/4K.

官方
支持模型: SeeDream 4.5 · Midjourney · Nano Banana 2 · Nano Banana Pro

📦安装

在终端中运行以下命令安装此 Skill:

clawhub install ima-image-ai

✨ 主要特性

  • 多模型支持 (DALL-E 3, Midjourney, Stable Diffusion)
  • 智能提示词优化
  • 批量生成
  • 图片增强和编辑
  • 风格迁移
  • 高分辨率输出

📖 使用指南

生成图片

使用简单的提示词生成图片

import { ImaImage } from "@ima-claw/image"

const generator = new ImaImage()
const image = await generator.create({
  prompt: "A beautiful sunset over mountains",
  model: "dall-e-3",
  size: "1024x1024"
})

配置选项

使用高级配置选项

const image = await generator.create({
  prompt: "Mountain landscape",
  style: "photorealistic",
  quality: "hd",
  aspectRatio: "16:9",
  negativePrompt: "blurry, low quality"
})

💡 示例代码

批量生成

一次生成多张图片

const images = await generator.batch({
  prompts: ["sunset", "ocean", "forest"],
  count: 3,
  model: "dall-e-3"
})

图片编辑

编辑现有图片

const edited = await generator.edit({
  image: "path/to/image.png",
  prompt: "Add a rainbow in the sky",
  mask: "path/to/mask.png"
})

📚 API 参考

create(options)

生成单张图片

interface CreateOptions {
  prompt: string
  model?: "dall-e-3" | "midjourney" | "stable-diffusion"
  size?: string
  quality?: "standard" | "hd"
  style?: string
}

🔧 故障排除

  • 如果生成失败,检查提示词是否符合内容政策
  • 批量生成时注意 API 配额限制
  • 高质量图片生成需要更长时间