Skip to content

图生视差动画插件 DepthFlow

功能介绍

上传一张图片,生成 2.5D 视差动画。给定一张静态图,如下图所示:

AmazingScene_v3.png

效果视频:(此处放了一个 gif 图用于演示,视频效果要远超该图)

AnimateDiff_00002.gif

安装

需要安装三个插件

均使用插件管理器安装,安装完成之后,重启 ComfyUI。

模型下载

(支持自动下载)根据选择下载 Kijai/DepthAnythingV2-safetensors 中的指定文件到目录 ComfyUI/models/depthanything

使用

img.png

工作流下载地址 网盘地址

工作流组成:使用 DepthAnything 节点生成深度图;使用 Depthflow 节点生成视差动画;使用 VideoHelperSuite 合并帧,生成视频。

Depthflow 核心节点:Depthflow,核心参数如下

  • image:输入图像
  • depth_map:输入图像对应的深度图
  • motion:用于配置动画的 Depthflow 运动对象
  • effects:(可选)深度流效果,包括可堆叠的 DOF 和 Vignette
  • num_frames:动画的帧数
  • input_fps:每秒输入的帧数
  • output_fps:输出视频的每秒帧数
  • quality:输出质量(1-100)
  • invert:反转深度图
  • tiling_mode:控制平铺图像

Depthflow 核心节点:Depthflow Motion:提供了6种运动节点,具体见:官网介绍

  • Orbital Motion Preset: Creates an orbital motion around a focal point, giving a 3D rotational effect.
  • Dolly Motion Preset: Simulates a dolly camera motion, moving toward or away from the subject for a dynamic depth effect.
  • Circle Motion Preset: Creates smooth circular motion around a point of focus, simulating rotational camera movement.
  • Vertical Motion Preset: Applies vertical panning motion to the scene, moving the view up or down.
  • Horizontal Motion Preset: Moves the scene horizontally, simulating a side-to-side panning motion.
  • Zoom Motion Preset: Configure zoom intensity, direction (inward or outward), and looping behavior for dramatic zoom effects.

除了上述预设的6个节点之外,为了更精细化的控制运动行为,还提供了6种运动组件:

  • Linear Motion Component: Applies a linear motion to the specified target, creating a steady and consistent movement.
  • Exponential Motion Component: Generates motion with an exponential curve, starting slow and accelerating over time.
  • Sine Motion Component: Applies a sine wave modulation to any target parameter, creating a smooth, oscillating motion.
  • Cosine Motion Component: Similar to the sine component, but starts at a different phase, useful for wave-like motion with a different timing.
  • Arc Motion Component: Moves the target parameter along a smooth arc, perfect for rotational or sweeping motion.
  • Set Target Motion Component: Explicitly sets the value of a specified target parameter, overriding other motion inputs.

Depthflow 核心节点:Depthflow Effects:提供了2种效果增强节点,具体见:官网介绍

  • DOF Effect: A depth-aware blur effect to simulate focus and bokeh, giving your animations a cinematic feel. 会导致远景虚化,突出画面重点。
  • Vignette Effect: A vignette effect that darkens the edges of the frame.远景依然清晰。

文章的最后,如果您觉得本文对您有用,请打赏一杯咖啡!感谢!