mcpField
F
fal-image-to-video

fal-image-to-video

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

关于 fal-image-to-video

fal-image-to-video 是一项为图像动画任务提供参考的技能,面向使用 fal.ai 将静态图像转换为视频的创作者和开发者。它汇总多个模型的端点、参数、提示词建议及常见工作流。

主要功能

  1. 01涵盖多种图像转视频模型
  2. 02整理端点与输入参数
  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-image-to-video

安装后在 Claude Code 中输入/fal-image-to-video确认已加载。

详细介绍

快速参考

模型端点音频循环最适合
Kling 2.6 Profal-ai/kling-video/v2.6/pro/image-to-video是否电影感
MiniMaxfal-ai/minimax-video/image-to-video否否稳定可靠
Lumafal-ai/luma-dream-machine否是创意制作
SVDfal-ai/stable-video-diffusion否否快速测试
动作类型关键词示例
角色行走、转身、微笑“她慢慢转过头”
自然摇曳、流动、落下“树叶在风中飘动”
摄像机平移、缩放、跟踪“摄像机慢慢向右平移”
用例推荐模型
肖像Kling 2.5/2.6 Pro
产品MiniMax(优化器)
风景Luma(循环)
快速测试SVD、Runway Turbo

何时使用此技能

用于图像动画:

  • 为静态肖像添加自然动作
  • 制作产品展示视频
  • 生成环境氛围循环视频
  • 为风景添加细微动态
  • 在最终渲染前预览工作流

相关技能:

  • 文本转视频:参见 fal-text-to-video
  • 视频编辑:参见 fal-video-to-video
  • 先进行文本转图像:参见 fal-text-to-image

fal.ai 图像转视频模型

fal.ai 上所有图像动画和图像转视频模型的完整参考。

Kling 图像转视频

Kling 2.0 图像转视频

端点: fal-ai/kling-video/v2.0/image-to-video 最适合: 标准图像动画

import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/kling-video/v2.0/image-to-video", {
  input: {
    prompt: "The person slowly turns their head and smiles warmly",
    image_url: "https://example.com/portrait.jpg",
    duration: "5",
    aspect_ratio: "16:9"
  }
});

console.log(result.video.url);
import fal_client

result = fal_client.subscribe(
    "fal-ai/kling-video/v2.0/image-to-video",
    arguments={
        "prompt": "The person slowly turns their head and smiles",
        "image_url": "https://example.com/portrait.jpg",
        "duration": "5",
        "aspect_ratio": "16:9"
    }
)
print(result["video"]["url"])
Kling 2.5 Pro 图像转视频

端点: fal-ai/kling-video/v2.5/pro/image-to-video 最适合: 专业品质动画

const result = await fal.subscribe("fal-ai/kling-video/v2.5/pro/image-to-video", {
  input: {
    prompt: "The car drives forward along the mountain road, camera follows",
    image_url: "https://example.com/car-scene.jpg",
    duration: "5",
    aspect_ratio: "16:9",
    negative_prompt: "static, frozen, distorted"
  }
});
Kling 2.6 Pro 图像转视频(最新版)

端点: fal-ai/kling-video/v2.6/pro/image-to-video 最适合: 原生音频带来的最高品质

const result = await fal.subscribe("fal-ai/kling-video/v2.6/pro/image-to-video", {
  input: {
    prompt: "The waterfall cascades down with a gentle roar, birds fly past",
    image_url: "https://example.com/waterfall.jpg",
    duration: "5",
    aspect_ratio: "16:9"
  }
});

console.log(result.video.url);
console.log(result.audio?.url);  // Native audio

Kling 参数:

参数类型值描述
promptstring-动作描述
image_urlstring-源图像 URL
durationstring"5", "10"时长(秒)
aspect_ratiostring"16:9", "9:16", "1:1"输出尺寸
negative_promptstring-要避免的内容

MiniMax 图像转视频

MiniMax Hailuo

端点: fal-ai/minimax-video/image-to-video 最适合: 通过提示词优化实现可靠的图像动画

const result = await fal.subscribe("fal-ai/minimax-video/image-to-video", {
  input: {
    prompt: "The cat stretches and yawns, then walks forward",
    image_url: "https://example.com/sleeping-cat.jpg",
    prompt_optimizer: true  // Auto-enhance prompt
  }
});
result = fal_client.subscribe(
    "fal-ai/minimax-video/image-to-video",
    arguments={
        "prompt": "The cat stretches and yawns",
        "image_url": "https://example.com/cat.jpg",
        "prompt_optimizer": True
    }
)

MiniMax 参数:

参数类型描述
promptstring动作描述
image_urlstring源图像 URL
prompt_optimizerboolean自动优化提示词

LTX 图像转视频

LTX Video 图像转视频

端点: fal-ai/ltx-video/image-to-video 最适合: 快速图像动画

const result = await fal.subscribe("fal-ai/ltx-video/image-to-video", {
  input: {
    prompt: "The flowers sway gently in the breeze",
    image_url: "https://example.com/flower-field.jpg",
    negative_prompt: "static, frozen",
    num_inference_steps: 30,
    guidance_scale: 7.5
  }
});
LTX Video v2 图像转视频

端点: fal-ai/ltx-video/v2/image-to-video 最适合: 更高品质的动画

const result = await fal.subscribe("fal-ai/ltx-video/v2/image-to-video", {
  input: {
    prompt: "Smoke rises and swirls from the chimney",
    image_url: "https://example.com/cabin.jpg",
    num_inference_steps: 35,
    guidance_scale: 7.0
  }
});

LTX 参数:

参数类型默认值描述
promptstring-动作描述
image_urlstring-源图像
negative_promptstring-要避免的内容
num_inference_stepsnumber30质量步数
guidance_scalenumber7.5提示词遵循度

Runway Gen-3 图像转视频

Runway Gen-3 Turbo

端点: fal-ai/runway-gen3/turbo/image-to-video 最适合: 快速迭代、预览

const result = await fal.subscribe("fal-ai/runway-gen3/turbo/image-to-video", {
  input: {
    prompt: "The model walks confidently down the runway",
    image_url: "https://example.com/fashion-shot.jpg",
    duration: 5
  }
});

Runway 参数:

参数类型值描述
promptstring-动作描述
image_urlstring-源图像
durationnumber5, 10秒

Luma Dream Machine

Luma 图像转视频

端点: fal-ai/luma-dream-machine 适用场景: 创意艺术动画

const result = await fal.subscribe("fal-ai/luma-dream-machine", {
  input: {
    prompt: "The magical portal opens with swirling energy",
    image_url: "https://example.com/fantasy-scene.jpg",
    aspect_ratio: "16:9",
    loop: true  // Create seamless loop
  }
});
result = fal_client.subscribe(
    "fal-ai/luma-dream-machine",
    arguments={
        "prompt": "The portal opens with swirling energy",
        "image_url": "https://example.com/scene.jpg",
        "aspect_ratio": "16:9",
        "loop": True
    }
)

Luma 参数:

参数类型描述
promptstring动作描述
image_urlstring源图像
aspect_ratiostring"16:9"、"9:16"、"1:1"
loopboolean创建循环视频

Wan 图像转视频

Wan v2.1 图像转视频

端点: fal-ai/wan/v2.1/1.3b/image-to-video 适用场景: 轻量级动画

const result = await fal.subscribe("fal-ai/wan/v2.1/1.3b/image-to-video", {
  input: {
    prompt: "The leaves flutter and fall from the tree",
    image_url: "https://example.com/autumn-tree.jpg",
    num_frames: 81
  }
});

Stable Video Diffusion

SVD 图像转视频

端点: fal-ai/stable-video-diffusion 适用场景: 开源图像动画

const result = await fal.subscribe("fal-ai/stable-video-diffusion", {
  input: {
    image_url: "https://example.com/landscape.jpg",
    motion_bucket_id: 127,  // 0-255, higher = more motion
    fps: 7,
    num_frames: 25
  }
});

SVD 参数:

参数类型默认值描述
image_urlstring-源图像
motion_bucket_idnumber127动作强度(0-255)
fpsnumber7每秒帧数
num_framesnumber25总帧数
seednumber-用于复现结果
SVD XT

端点: fal-ai/stable-video-diffusion-xt 适用场景: 延长视频时长

const result = await fal.subscribe("fal-ai/stable-video-diffusion-xt", {
  input: {
    image_url: "https://example.com/scene.jpg",
    motion_bucket_id: 127,
    num_frames: 25,
    fps: 6
  }
});

CogVideoX 图像转视频

CogVideoX-5B 图像转视频

端点: fal-ai/cogvideox-5b/image-to-video 适用场景: 开源替代方案

const result = await fal.subscribe("fal-ai/cogvideox-5b/image-to-video", {
  input: {
    prompt: "The astronaut waves to the camera",
    image_url: "https://example.com/astronaut.jpg",
    num_inference_steps: 50,
    guidance_scale: 6.0
  }
});

模型比较

质量排名
层级模型质量速度
高级Kling 2.6 Pro最高慢
专业Kling 2.5 Pro、Runway高中
标准MiniMax、LTX v2良好快
经济SVD、CogVideoX可接受快
功能比较
模型音频时长循环适用场景
Kling 2.6 Pro是5-10 秒否电影感
Kling 2.5 Pro否5-10 秒否专业用途
MiniMax否6 秒否稳定可靠
Runway Turbo否5-10 秒否快速生成
Luma否5 秒是创意用途
SVD否3-4 秒否开源

图像动画提示词工程

动作描述结构
[Subject action] + [Motion quality] + [Camera movement] + [Atmosphere]

示例:

// Good: Specific motion
"The woman slowly turns her head to the right and smiles, gentle breeze moves her hair"

// Bad: Vague
"The woman moves"
动作类型
类型关键词示例
角色"walks"、"runs"、"dances"、"gestures""她挥手问好"
自然"sways"、"flows"、"rustles"、"falls""树叶轻轻飘落"
机械"rotates"、"spins"、"moves"、"opens""门缓缓打开"
氛围"drifts"、"swirls"、"rises"、"disperses""雾气飘过"
镜头运动关键词
关键词效果
"camera slowly pans"水平扫动
"slight zoom in"逐渐放大
"tracking shot"跟随主体
"static camera"摄像机不移动
"subtle camera shake"手持拍摄感
质量修饰词
  • "smooth motion"
  • "natural movement"
  • "fluid animation"
  • "subtle motion"
  • "cinematic"

完整参数参考

interface ImageToVideoInput {
  // Required
  prompt: string;
  image_url: string;

  // Duration (varies by model)
  duration?: number | string;

  // Dimensions
  aspect_ratio?: "16:9" | "9:16" | "1:1";

  // Quality
  negative_prompt?: string;
  num_inference_steps?: number;
  guidance_scale?: number;

  // Model-specific
  prompt_optimizer?: boolean;  // MiniMax
  loop?: boolean;              // Luma
  motion_bucket_id?: number;   // SVD (0-255)
  fps?: number;                // SVD
  num_frames?: number;         // SVD, Wan

  // Reproducibility
  seed?: number;
}

工作流示例

肖像动画流程
// 1. Generate a portrait image
const portrait = await fal.subscribe("fal-ai/flux/dev", {
  input: {
    prompt: "Professional headshot of a business woman, neutral expression, studio lighting",
    image_size: "portrait_4_3"
  }
});

// 2. Animate the portrait
const video = await fal.subscribe("fal-ai/kling-video/v2.5/pro/image-to-video", {
  input: {
    prompt: "She slowly turns her head, makes eye contact with camera, and gives a warm professional smile",
    image_url: portrait.images[0].url,
    duration: "5",
    aspect_ratio: "16:9"
  }
});

console.log(video.video.url);
产品展示
// Animate product image
const result = await fal.subscribe("fal-ai/minimax-video/image-to-video", {
  input: {
    prompt: "The camera slowly rotates around the product, highlighting details, studio lighting",
    image_url: "https://example.com/product-shot.jpg",
    prompt_optimizer: true
  }
});
自然场景
// Create ambient nature video
const result = await fal.subscribe("fal-ai/luma-dream-machine", {
  input: {
    prompt: "Gentle breeze moves through the grass, clouds drift slowly overhead, peaceful ambient motion",
    image_url: "https://example.com/landscape.jpg",
    aspect_ratio: "16:9",
    loop: true  // Perfect for background video
  }
});
快速预览工作流
// Quick preview with faster model
const preview = await fal.subscribe("fal-ai/stable-video-diffusion", {
  input: {
    image_url: sourceImage,
    motion_bucket_id: 100
  }
});

console.log("Preview:", preview.video.url);

// If satisfied, use higher quality model
const final = await fal.subscribe("fal-ai/kling-video/v2.6/pro/image-to-video", {
  input: {
    prompt: "Refined motion description based on preview",
    image_url: sourceImage,
    duration: "5"
  }
});

最佳实践

图像准备
  1. 高分辨率: 使用高质量源图像
  2. 主体清晰: 确保主要主体清晰可见
  3. 合理构图: 为动作留出空间
  4. 光照一致: 避免强烈阴影
提示词技巧
  1. 描述动作,而非静态场景
  2. 明确指定方向(左、右、向前)
  3. 注明速度(缓慢、快速、逐渐)
  4. 使动作与图像内容相匹配
常见问题
问题原因解决方案
输出静止不动提示词含糊添加具体的动作动词
面部扭曲动作过快使用“微妙”“轻柔”等描述
动作不一致场景复杂聚焦于一个元素
动作被截断时长太短如果支持,延长时长
Model Selection
Use CaseRecommended Model
PortraitsKling 2.5/2.6 Pro
ProductsMiniMax (prompt optimizer)
LandscapesLuma (loop option)
Fast testingSVD, Runway Turbo
With audioKling 2.6 Pro

评论

支持 Markdown