mcpField
F
fal-model-guide

fal-model-guide

github.com/josiahsiegel创意与媒体5973 次安装19 周前更新
代码仓库

关于 fal-model-guide

fal-model-guide 是面向使用 fal.ai 模型的创作者与开发者的模型选择指南,涵盖图像、视频、音频和 3D 生成。它通过模型能力、质量、速度、成本及参数说明,辅助开发与生产阶段的选型。

主要功能

  1. 01按质量与速度比较模型
  2. 02覆盖图像、视频、音频和 3D
  3. 03提供模型端点与参数参考
  4. 04给出开发和生产选型建议
  5. 05包含成本与性能优化提示

适用场景

  1. 01为图像生成选择合适模型
  2. 02按质量层级挑选视频模型
  3. 03为音频转录或语音合成选型
  4. 04规划生成任务的成本与性能

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill fal-model-guide

安装后在 Claude Code 中输入/fal-model-guide确认已加载。

详细介绍

快速参考

类别快速/低成本均衡最高质量
图像FLUX SchnellFLUX.1 DevFLUX.2 Pro
视频Runway TurboLTX-2 ProKling 2.6 Pro
音频 STTWhisper TurboWhisperWhisper Large v3
音频 TTSKokoroXTTSElevenLabs
FLUX 模型端点步数用例
FLUX.2 Profal-ai/flux-2-pro28生产环境
FLUX.1 Devfal-ai/flux/dev28高质量
FLUX Schnellfal-ai/flux/schnell4快速迭代
视频模型时长音频速度
Kling 2.6 Pro5-10s有慢
LTX-2 Pro5s有中等
Runway Turbo5-10s无快

何时使用此技能

用于模型选择决策:

  • 比较 FLUX 与 SDXL 的图像生成效果
  • 按质量等级选择视频模型
  • 选择合适的模型以优化成本
  • 了解特定模型的参数
  • 构建生产环境或开发环境的流水线

相关技能:

  • 如需文本生成图像:请参阅 fal-text-to-image
  • 如需文本生成视频:请参阅 fal-text-to-video
  • 如需音频模型:请参阅 fal-audio

fal.ai 模型选择指南

全面介绍如何为你的用例选择合适的 fal.ai 模型。

图像生成模型

FLUX 系列
模型端点最适用于速度质量成本
FLUX.2 [pro]fal-ai/flux-2-pro生产环境、最高质量中等最高$$$
FLUX.1 [dev]fal-ai/flux/dev高质量、开源中等高$$
FLUX Schnellfal-ai/flux/schnell快速迭代快良好$
FLUX LoRAfal-ai/flux-lora自定义训练风格中等高$$
FLUX Realismfal-ai/flux-realism照片级写实图像中等高$$

FLUX.2 Pro - 最新、质量最佳

const result = await fal.subscribe("fal-ai/flux-2-pro", {
  input: {
    prompt: "Professional product photo of a watch",
    image_size: "square_hd",
    num_inference_steps: 28,
    guidance_scale: 3.5
  }
});

FLUX.1 Dev - 最佳开源选项

const result = await fal.subscribe("fal-ai/flux/dev", {
  input: {
    prompt: "A serene mountain landscape",
    image_size: "landscape_16_9",
    num_inference_steps: 28
  }
});

FLUX Schnell - 4 步快速生成

const result = await fal.subscribe("fal-ai/flux/schnell", {
  input: {
    prompt: "Quick concept sketch",
    num_inference_steps: 4  // Optimized for 4 steps
  }
});
Stable Diffusion 模型
模型端点最适用于
Fast SDXLfal-ai/fast-sdxl速度快、成本低
SDXLfal-ai/stable-diffusion-xl经典 SDXL
SD 1.5fal-ai/stable-diffusion-v15兼容旧版
SDXL Turbofal-ai/sdxl-turbo极速
// Fast SDXL - Good balance of speed and quality
const result = await fal.subscribe("fal-ai/fast-sdxl", {
  input: {
    prompt: "A colorful abstract painting",
    image_size: "square_hd",
    num_inference_steps: 25
  }
});
专用图像模型
模型端点用例
Recraft V3fal-ai/recraft-v3设计素材、矢量图
Ideogramfal-ai/ideogram在图像中生成文本
Playground v2.5fal-ai/playground-v25创意/艺术创作
Kandinsky 3fal-ai/kandinsky-3俄罗斯模型
图像转图像模型
模型端点用例
FLUX i2ifal-ai/flux/dev/image-to-image转换图像
FLUX Inpaintfal-ai/flux/dev/inpainting编辑局部区域
FLUX ControlNetfal-ai/flux/dev/controlnet引导生成
IP-Adapterfal-ai/ip-adapter-flux风格迁移
// Image-to-Image transformation
const result = await fal.subscribe("fal-ai/flux/dev/image-to-image", {
  input: {
    image_url: "https://example.com/photo.jpg",
    prompt: "Transform into watercolor painting style",
    strength: 0.75  // 0-1, how much to change
  }
});

// Inpainting (edit specific regions)
const result = await fal.subscribe("fal-ai/flux/dev/inpainting", {
  input: {
    image_url: "https://example.com/photo.jpg",
    mask_url: "https://example.com/mask.png",
    prompt: "A golden retriever"
  }
});

// ControlNet (structural guidance)
const result = await fal.subscribe("fal-ai/flux/dev/controlnet", {
  input: {
    prompt: "Modern house design",
    control_image_url: "https://example.com/edges.png",
    controlnet_conditioning_scale: 0.8
  }
});

视频生成模型

文本生成视频
模型端点质量时长音频最适用于
Kling 2.6 Profal-ai/kling-video/v2.6/pro最高5-10s原生电影感
Sora 2fal-ai/sora最高5-20s可选进阶创作
LTX-2 Profal-ai/ltx-video-2-pro高5s有快速高质量生成
Runway Gen-3fal-ai/runway/gen3/turbo高5-10s无快速生成
Lumafal-ai/luma-dream-machine良好5s无创意创作
CogVideoXfal-ai/cogvideox良好6s无开源

Kling 2.6 Pro - 综合质量最佳

const result = await fal.subscribe("fal-ai/kling-video/v2.6/pro", {
  input: {
    prompt: "A majestic eagle soaring over mountains at golden hour",
    duration: 5,
    aspect_ratio: "16:9",
    negative_prompt: "blurry, distorted",
    cfg_scale: 0.5
  }
});

LTX-2 Pro - 快速生成并支持音频

const result = await fal.subscribe("fal-ai/ltx-video-2-pro", {
  input: {
    prompt: "Ocean waves crashing on rocks",
    resolution: "720p",
    enable_audio: true
  }
});
图像转视频
模型端点最适合
MiniMax Hailuofal-ai/minimax/video-01图像动画
Kling i2vfal-ai/kling-video/v2.6/pro/image-to-video高质量动画
Luma i2vfal-ai/luma-dream-machine创意内容
Runway i2vfal-ai/runway/gen3/turbo/image-to-video快速生成
// Animate a still image
const result = await fal.subscribe("fal-ai/minimax/video-01", {
  input: {
    image_url: "https://example.com/portrait.jpg",
    prompt: "Person slowly turns head and smiles",
    prompt_optimizer: true
  }
});
视频转视频(编辑)
// Edit/transform existing video
const result = await fal.subscribe("fal-ai/kling-video/o1", {
  input: {
    video_url: "https://example.com/video.mp4",
    prompt: "Change to anime style"
  }
});

音频模型

语音转文本
模型端点最适合
Whisperfal-ai/whisper准确转录
Whisper Turbofal-ai/whisper-turbo快速转录
const result = await fal.subscribe("fal-ai/whisper", {
  input: {
    audio_url: "https://example.com/speech.mp3",
    task: "transcribe",  // or "translate"
    language: "en",
    chunk_level: "segment"
  }
});

console.log(result.text);
console.log(result.chunks);  // With timestamps
文本转语音
模型端点最适合
Elevenlabsfal-ai/elevenlabs高级音色
F5-TTSfal-ai/f5-tts声音克隆
Kokorofal-ai/kokoro多语言
// Text-to-speech with Elevenlabs
const result = await fal.subscribe("fal-ai/elevenlabs", {
  input: {
    text: "Hello, welcome to our service.",
    voice_id: "voice_id_here"
  }
});

3D 生成模型

模型端点用途
TripoSRfal-ai/triposr图像转 3D 网格
InstantMeshfal-ai/instantmesh快速 3D 生成
Stable Zero123fal-ai/stable-zero123新视角合成
// Generate 3D mesh from image
const result = await fal.subscribe("fal-ai/triposr", {
  input: {
    image_url: "https://example.com/object.jpg"
  }
});

console.log(result.model_mesh.url);  // GLB/OBJ file

模型选择决策树

What do you want to create?
├── Image
│   ├── From text only?
│   │   ├── Need best quality? → FLUX.2 Pro
│   │   ├── Need fast iteration? → FLUX Schnell
│   │   ├── Need open-source? → FLUX.1 Dev
│   │   └── Budget conscious? → Fast SDXL
│   ├── Transform existing image?
│   │   ├── Style transfer → FLUX i2i
│   │   ├── Edit specific region → FLUX Inpainting
│   │   └── Follow structure → FLUX ControlNet
│   └── Need text in image? → Ideogram
│
├── Video
│   ├── From text only?
│   │   ├── Need best quality? → Kling 2.6 Pro
│   │   ├── Need fast preview? → Runway Gen-3 Turbo
│   │   └── Need audio? → LTX-2 Pro or Kling
│   ├── Animate image? → MiniMax Hailuo
│   └── Edit video? → Kling O1
│
├── Audio
│   ├── Speech to text?
│   │   ├── Accurate → Whisper
│   │   └── Fast → Whisper Turbo
│   └── Text to speech? → Elevenlabs / F5-TTS
│
└── 3D
    └── Image to 3D? → TripoSR

性能对比

图像生成速度
模型~耗时(1024x1024)
FLUX Schnell1-2s
Fast SDXL2-3s
FLUX.1 Dev5-8s
FLUX.2 Pro8-12s
视频生成速度
模型~耗时(5s 视频)
Runway Gen-3 Turbo30-60s
LTX-2 Pro60-90s
Kling 2.6 Pro120-180s

成本优化策略

  1. 开发阶段

    • 使用 FLUX Schnell 迭代提示词
    • 使用 Fast SDXL 进行快速测试
    • 使用 Runway Gen-3 Turbo 预览视频
  2. 生产阶段

    • 使用 FLUX.2 Pro 生成最终图像
    • 使用 Kling 2.6 Pro 生成最终视频
  3. 批量处理

    • 在非高峰时段处理
    • 使用合适的图像尺寸(无需时不要放大)
    • 按种子缓存结果,以确保可复现性
  4. 资源效率

    • 按目标分辨率生成(不要先生成更大尺寸再缩小)
    • 高吞吐量场景使用 Webhook(避免轮询开销)
    • 实现客户端缓存

模型专属技巧

FLUX 技巧
  • 引导系数设为 3-4 效果最佳
  • 28 步是最佳默认值
  • Schnell 仅使用 4 步效果最佳
  • 详细的提示词能产生更好的结果
视频技巧
  • 在提示词中加入镜头运动
  • 明确描述动作/运动
  • 使用负面提示词避免伪影
  • 测试时从较短时长开始
Whisper 技巧
  • 提供语言提示以提高准确度
  • 非英语转英语时使用 "translate" 任务
  • chunk_level="segment" 可提供时间戳

探索更多模型

访问 https://fal.ai/models 查看包含 600 多个模型的完整目录,其中包括:

  • 人脸修复/增强
  • 背景移除
  • 放大
  • 风格迁移
  • OCR
  • 目标检测
  • 以及更多专用模型

评论

支持 Markdown