This ComfyUI workflow is designed to convert video footage into a temporally stable depth map using advanced AI models. At its core, the workflow leverages the Depth Anything v2 model, which is well-suited for generating accurate depth maps from video inputs. The process begins with the VHS_LoadVideo node, which allows users to import their video files into the workflow. The DepthAnything_V2 node then processes each frame of the video, creating a depth map that maintains temporal consistency across frames. This is crucial for applications where smooth transitions and stability are required, such as in augmented reality or 3D reconstruction projects.
The workflow also includes nodes like VHS_VideoCombine and VHS_VideoInfo, which facilitate the integration and management of video data within the ComfyUI environment. The comfyui-videohelpersuite and comfyui_controlnet_aux custom nodes enhance the workflow's capability to handle video-specific tasks and control parameters effectively. By utilizing these nodes, users can achieve high-quality depth maps that are ready for further processing or integration into various applications. This workflow is particularly useful for professionals in fields such as virtual reality, gaming, and film production, where depth information can significantly enhance the realism and interactivity of digital content.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run "Video to Depth Map" (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("utility-depthAnything-v2-relative-video_api.json");
const job = await client.run(wf);
await job.getOutputs("7")[0].toFile("output.png"); // VHS_VideoCombineThe SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
FAQ















