> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-wan3-30off-promo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ComfyUI preprocessor workflows

> Learn how to use depth estimation, lineart conversion, pose detection, and normals extraction preprocessors in ComfyUI

## What are preprocessors?

<Note>
  These workflows contain custom nodes. You need to install them using [ComfyUI Manager](/manager/overview) before running the workflows.
</Note>

Preprocessors are foundational tools that extract structural information from images. They convert images into conditioning signals like depth maps, lineart, pose skeletons, and surface normals. These outputs drive better control and consistency in ControlNet, image-to-image, and video workflows.

Using preprocessors as separate workflows enables:

* Faster iteration without full graph reruns
* Clear separation of preprocessing and generation
* Easier debugging and tuning
* More predictable image and video results

## Depth estimation

Depth estimation converts a flat image into a depth map representing relative distance within a scene. This structural signal is foundational for controlled generation, spatially aware edits, and relighting workflows.

This workflow emphasizes:

* Clean, stable depth extraction
* Consistent normalization for downstream use
* Easy integration with ControlNet and image-edit pipelines

Depth outputs can be reused across multiple passes, making it easier to iterate without re-running expensive upstream steps.

<h3 id="utility-depthAnything-v2-relative-video">
  Video to Depth Map
</h3>

Convert a video to a temporally stable depth map.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/utility-depthAnything-v2-relative-video-1.webp" alt="Video to Depth Map workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=utility-depthAnything-v2-relative-video&utm_source=docs&utm_medium=referral&utm_campaign=preprocessors">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/utility-depthAnything-v2-relative-video.json">
    Download JSON or search "Video to Depth Map" in Template Library
  </Card>
</CardGroup>

**Input materials**

Upload this file to the matching `VHS_LoadVideo` node:

<CardGroup cols={2}>
  <Card title="roller_coaster.mp4" icon="download" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/roller_coaster.mp4">
    `VHS_LoadVideo` node 6 · `roller_coaster.mp4`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <video controls style={{width: '100%', height: 'auto'}}>
    <source src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/roller_coaster.mp4" type="video/mp4" />
  </video>
</div>

## Lineart conversion

Lineart preprocessors distill an image down to its essential edges and contours, removing texture and color while preserving structure.

This workflow is designed to:

* Produce clean, high-contrast lineart
* Minimize broken or noisy edges
* Provide reliable structural guidance for stylization and redraw workflows

Lineart pairs especially well with depth and pose, offering strong structural constraints without overconstraining style.

<h3 id="utility-lineart-video">
  Video to Lineart / Canny
</h3>

Convert a video to lineart or Canny edges for control processors.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/utility-lineart-video-1.webp" alt="Video to Lineart workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=utility-lineart-video&utm_source=docs&utm_medium=referral&utm_campaign=preprocessors">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/utility-lineart-video.json">
    Download JSON or search "Video to Lineart / Canny" in Template Library
  </Card>
</CardGroup>

**Input materials**

Upload this file to the matching `VHS_LoadVideo` node:

<CardGroup cols={2}>
  <Card title="utility-lineart-video-input.mp4" icon="download" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/utility-lineart-video-input.mp4">
    `VHS_LoadVideo` node 2 · `utility-lineart-video-input.mp4`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <video controls style={{width: '100%', height: 'auto'}}>
    <source src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/utility-lineart-video-input.mp4" type="video/mp4" />
  </video>
</div>

## Pose detection

Pose detection extracts body keypoints and skeletal structure from images, enabling precise control over human posture and movement.

This workflow focuses on:

* Clear, readable pose outputs
* Stable keypoint detection suitable for reuse across frames
* Compatibility with pose-based ControlNet and animation pipelines

By isolating pose extraction into a dedicated workflow, pose data becomes easier to inspect, refine, and reuse.

<h3 id="utility-openpose-video">
  Video to Pose Map - OpenPose
</h3>

Convert a video to a temporally stable pose control map.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/utility-openpose-video-1.webp" alt="Video to Pose Map workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=utility-openpose-video&utm_source=docs&utm_medium=referral&utm_campaign=preprocessors">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/utility-openpose-video.json">
    Download JSON or search "Video to Pose Map - OpenPose" in Template Library
  </Card>
</CardGroup>

**Input materials**

Upload this file to the matching `VHS_LoadVideo` node:

<CardGroup cols={2}>
  <Card title="pose_input.mp4" icon="download" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pose_input.mp4">
    `VHS_LoadVideo` node 2 · `pose_input.mp4`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <video controls style={{width: '100%', height: 'auto'}}>
    <source src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pose_input.mp4" type="video/mp4" />
  </video>
</div>

## Normals extraction

Normals estimation converts a flat image into a surface normal map: a per-pixel direction field that describes how each part of a surface is oriented (typically encoded as RGB). This signal is useful for relighting, material-aware stylization, and highly structured edits.

This workflow emphasizes:

* Clean, stable normal extraction with minimal speckling
* Consistent orientation and normalization for reliable downstream use
* ControlNet-ready outputs for relighting, refinement, and structure-preserving edits
* Reuse across passes so you can iterate without re-running earlier steps

Normal outputs can be used to:

* Drive relight/shading changes while preserving geometry
* Add a stronger 3D-like structure to stylization and redraw pipelines
* Improve consistency across frames when paired with pose/depth for animation work

<h3 id="utility-normal_crafter-video">
  Video to Normal Map
</h3>

Convert a video to a temporally stable normal map.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/utility-normal_crafter-video-1.webp" alt="Video to Normal Map workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=utility-normal_crafter-video&utm_source=docs&utm_medium=referral&utm_campaign=preprocessors">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/utility-normal_crafter-video.json">
    Download JSON or search "Video to Normal Map" in Template Library
  </Card>
</CardGroup>

**Input materials**

Upload this file to the matching `VHS_LoadVideo` node:

<CardGroup cols={2}>
  <Card title="normals_input.mp4" icon="download" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/normals_input.mp4">
    `VHS_LoadVideo` node 3 · `normals_input.mp4`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <video controls style={{width: '100%', height: 'auto'}}>
    <source src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/normals_input.mp4" type="video/mp4" />
  </video>
</div>
