This ComfyUI workflow is designed to convert video footage into a temporally stable normal map, which is particularly useful for enhancing 3D modeling and animation projects. By leveraging nodes such as the NormalCrafterNode and VHS_LoadVideo, the workflow processes each frame of the video to extract and generate a normal map that maintains consistency across frames. This temporal stability is crucial for applications where seamless transitions between frames are necessary, such as in video games or cinematic visual effects.
The workflow begins by loading the video using the VHS_LoadVideo node, which extracts individual frames and prepares them for processing. The NormalCrafterNode then takes these frames and computes the normal maps, ensuring that the lighting and shading information is accurately represented. The VHS_VideoCombine node is used to reassemble the processed frames back into a video format, while the VHS_VideoInfo node provides metadata about the video, such as frame rate and resolution. This combination of nodes makes the workflow highly effective for creating high-quality normal maps from video content, which can be used to add depth and realism to 3D environments.
API
從程式碼使用此工作流
每個 Comfy 工作流都是一個 JSON 圖。下方的 payload 就是此工作流,與 ComfyUI 執行時完全相同 — 你可以從此 URL 取得、放入版本控制,或在 ComfyUI 載入並逐節點執行。
使用 Comfy SDK 以 TypeScript 或 Python 執行。相同程式碼可用於 Comfy Cloud 或你自架的 ComfyUI — 只需更改 base URL。
// Install (beta)
npm i @comfyorg/sdk
// Run "影片轉法線貼圖" (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-normal_crafter-video_api.json");
const job = await client.run(wf);
await job.getOutputs("4")[0].toFile("output.png"); // VHS_VideoCombineSDK 需使用 API 格式的工作流:請在 ComfyUI 開啟此工作流,並使用 檔案 → 匯出工作流(API)。
常見問題















