Video to Normal Map - After
Video to Normal Map - Before

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

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.

utility-normal_crafter-video.json
Fetching workflow JSON…

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 Normal 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-normal_crafter-video_api.json");

const job = await client.run(wf);
await job.getOutputs("4")[0].toFile("output.png"); // VHS_VideoCombine

The 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

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates