mcpField
I
image-to-video

image-to-video

github.com/halt-catch-fire创意与媒体03.8k 次安装12 周前更新
代码仓库

关于 image-to-video

这是一个通过 inference.sh 应用将静态图像转为动画视频的 belt CLI 技能,涵盖模型选择、运动提示词,以及短片和动态照片的制作流程。

主要功能

  1. 01按内容和运动类型选择模型
  2. 02镜头与主体运动提示词示例
  3. 03提示词结构与运动建议
  4. 04片段时长和拼接指南
  5. 05静态图像转视频流程
  6. 06动态照片制作步骤

适用场景

  1. 01为风景或人像图片添加动画
  2. 02制作社交媒体短片
  3. 03制作循环播放的动态照片
  4. 04拼接短片以延长视频

安装

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

$npx skills add https://github.com/halt-catch-fire/mutiny --skill image-to-video

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

详细介绍

安装 belt CLI 技能: npx skills add belt-sh/cli

图片转视频

通过 inference.sh CLI 将静态图片转换为动画视频。

快速开始

需要 inference.sh CLI(belt)。安装说明

belt login

# Generate a still image
belt app run falai/flux-dev-lora --input '{
  "prompt": "serene mountain lake at sunset, snow-capped peaks reflected in still water, golden hour light, landscape photography",
  "width": 1248,
  "height": 832
}'

# Animate it
belt app run falai/wan-2-5-i2v --input '{
  "prompt": "gentle ripples on the lake surface, clouds slowly drifting, warm light shifting, birds flying in the distance",
  "image": "path/to/lake-image.png"
}'

模型选择

模型应用 ID最适合运动风格
Wan 2.5 i2vfalai/wan-2-5-i2v写实运动、自然动作照片级写实、细腻
WAN-I2V (Pruna)pruna/wan-i2v经济、快速、480p/720p自然、高效
Seedance 2.0bytedance/seedance-2-0最高支持 1080p、音画同步、支持所有输入类型多样、高质量
Seedance 2.0 Fastbytedance/seedance-2-0-fast快速版本,功能相同多样、快速
Fabric 1.0falai/fabric-1-0布料、织物、液体、流动材质基于物理的流动效果
Grok Imagine Videoxai/grok-imagine-video通用动画、文本引导多样
何时使用各模型
场景最佳模型原因
有水或云的风景Wan 2.5 i2v最擅长自然、逼真的运动
表情细微的人像Wan 2.5 i2v保持面部特征一致
带有布料或织物的产品Fabric 1.0专精于材质物理效果
飘扬的旗帜、流动的窗帘Fabric 1.0布料模拟
插画或艺术风格图片Seedance 2.0与风格化内容相匹配
通用的“让画面活起来”Seedance 2.0综合表现出色,最高支持 1080p
快速测试或迭代Seedance 2.0 Fast生成速度更快

运动类型

镜头运动
运动提示词关键词效果
推近 / 向前移动"slow dolly forward", "camera pushes in"增强亲近感或聚焦效果
拉远 / 向后移动"camera pulls back", "slow zoom out"展现更多画面和背景
向左或向右摇摄"camera pans slowly to the right"扫视、跟随
向上或向下倾斜"camera tilts upward"展现高度
环绕"camera orbits around the subject"3D 探索
升降镜头上升"camera rises upward"展现宏大场景
固定(不使用镜头运动提示词)仅主体运动
主体运动
类型提示词示例
自然元素"water rippling", "clouds drifting", "leaves rustling in breeze"
头发或衣物"hair blowing gently in wind", "dress fabric flowing"
氛围效果"fog slowly rolling", "dust particles floating in light beams"
人物"person slowly turns to camera", "subtle breathing motion"
机械"gears turning", "clock hands moving"
液体"coffee steam rising", "paint dripping", "water pouring"

提示词最佳实践

黄金法则:细腻胜过夸张

AI 视频模型对轻柔、细腻的运动的生成效果优于夸张的动作。要求过多运动会导致变形和瑕疵。

❌ "person running and jumping over obstacles while the camera spins"
✅ "person slowly walking forward, gentle breeze, camera follows alongside"

❌ "explosion with debris flying everywhere"
✅ "candle flame flickering gently, warm ambient light shifting"

❌ "fast zoom into the eyes with dramatic camera shake"
✅ "slow dolly forward toward the subject, subtle focus shift"
提示词结构
[Camera movement] + [Subject motion] + [Atmospheric effects] + [Mood/pace]
按场景分类的示例
# Landscape animation
belt app run falai/wan-2-5-i2v --input '{
  "prompt": "gentle camera pan right, water reflecting moving clouds, trees swaying slightly in breeze, warm golden light, peaceful and slow",
  "image": "landscape.png"
}'

# Portrait animation
belt app run falai/wan-2-5-i2v --input '{
  "prompt": "subtle breathing motion, slight head turn, natural eye blink, hair moving gently, soft ambient lighting shifts",
  "image": "portrait.png"
}'

# Product shot animation
belt app run bytedance/seedance-2-0 --input '{
  "prompt": "slow 360 degree orbit around the product, gentle spotlight movement, subtle reflections shifting, premium product showcase, smooth motion",
  "image": "product.png",
  "generate_audio": true
}'

# Fabric/cloth animation
belt app run falai/fabric-1-0 --input '{
  "prompt": "fabric flowing and rippling in gentle wind, natural cloth physics, soft movement",
  "image": "fabric-scene.png"
}'

# Architectural visualization
belt app run falai/wan-2-5-i2v --input '{
  "prompt": "slow dolly forward through the entrance, slight camera tilt upward, ambient light filtering through windows, dust particles in light beams",
  "image": "building-interior.png"
}'

时长指南

时长质量用途
2-3 秒最高质量GIF、循环背景、动态照片
4-5 秒高质量社交媒体帖子、产品展示
6-8 秒良好质量短片、转场
10 秒以上质量下降除非拼接较短片段,否则避免使用
延长时长

要生成更长的视频,可生成多个较短片段并进行拼接:

# Generate 3 clips from the same image with progressive motion
belt app run falai/wan-2-5-i2v --input '{
  "prompt": "slow pan left, gentle water motion",
  "image": "scene.png"
}' --no-wait

belt app run falai/wan-2-5-i2v --input '{
  "prompt": "continuing pan, clouds shifting, light changing",
  "image": "scene.png"
}' --no-wait

# Stitch together
belt app run infsh/media-merger --input '{
  "media": ["clip1.mp4", "clip2.mp4"]
}'

完整工作流

从静态图到最终视频的流程
# 1. Generate source image (best quality)
belt app run bytedance/seedream-4-5 --input '{
  "prompt": "cinematic landscape, misty mountains at dawn, lake in foreground, dramatic clouds, golden hour, 4K quality, professional photography",
  "size": "2K"
}'

# 2. Animate the image
belt app run falai/wan-2-5-i2v --input '{
  "prompt": "gentle mist rolling through the valley, lake surface rippling, clouds slowly moving, birds in distance, warm light shifting",
  "image": "landscape.png"
}'

# 3. Upscale video if needed
belt app run falai/topaz-video-upscaler --input '{
  "video": "animated-landscape.mp4"
}'

# 4. Add ambient audio
belt app run infsh/hunyuanvideo-foley --input '{
  "video": "animated-landscape.mp4",
  "prompt": "gentle nature ambience, distant birds, soft wind, water lapping"
}'

# 5. Merge video with audio
belt app run infsh/video-audio-merger --input '{
  "video": "upscaled-landscape.mp4",
  "audio": "ambient-audio.mp3"
}'

Cinemagraph 效果

Cinemagraph 是一种静态照片,其中只有一个元素在移动(例如,瀑布在静止的场景中流动)。要实现这种效果:

  1. 生成静态图像,并清晰呈现运动元素
  2. 仅提示该特定元素运动
  3. 时长保持在 2-4 秒,以实现无缝循环
belt app run falai/wan-2-5-i2v --input '{
  "prompt": "only the waterfall is moving, everything else remains perfectly still, water cascading smoothly, rest of scene frozen",
  "image": "waterfall-scene.png"
}'

常见错误

错误问题修正方法
要求过多运动失真、伪影、扭曲始终选择微妙而非夸张的运动
内容类型与模型不匹配效果不佳使用上方的选择指南
片段过长(10 秒以上)质量会显著下降时长保持在 3-5 秒,需要时拼接片段
未指定摄像机运动运动随机且不可预测始终指定摄像机行为
运动方向相互冲突混乱、不自然只指定一个主要运动方向
源图像分辨率低视频输出分辨率低从质量最高的源图像开始
动作场景过于复杂模型无法处理让运动保持简单、自然

相关技能

npx skills add inference-sh/skills@ai-video-generation
npx skills add inference-sh/skills@ai-image-generation
npx skills add inference-sh/skills@p-video
npx skills add inference-sh/skills@video-prompting-guide
npx skills add inference-sh/skills@prompt-engineering

浏览所有应用:belt app list

评论

支持 Markdown