ControlNet教程:用姿态、深度和边缘控制AI图像

2026-08-01 约 6 分钟阅读

文生图无法控制构图。ControlNet可以指定姿态、深度和结构。

ControlNet Tutorial 2026: Control AI Images With Poses, Depth and Edges

ControlNet, released by Lvmin Zhang and Maneesh Agrawala in February 2023, lets you condition image generation on structural inputs: a pose skeleton, a depth map, an edge drawing, or a segmentation mask. It remains the standard technique in 2026 for getting AI images to follow a composition.

What ControlNet Controls

Condition Input Use case
OpenPose Skeleton pose image Keep a character's pose exactly
Depth Depth map Consistent 3D layout
Canny/soft edges Edge drawing Match an outline or sketch
Segmentation Labeled mask Control object placement
Normal map Surface normals Consistent lighting direction

Setup (ComfyUI - the 2026 standard)

  1. Install ComfyUI (123,000 stars)
  2. Download a ControlNet model (e.g., control_v11p_sd15_openpose) from Hugging Face
  3. In the workflow, add a ControlNet loader node between the checkpoint and the sampler

The Workflow

Load Checkpoint -> CLIP Text Encode (prompt)
                        |
Load Image (pose) -> ControlNet Loader -> Apply ControlNet
                                              |
                                          KSampler -> VAE Decode -> Save

The Apply ControlNet node mixes the text prompt and the structural condition. The control_strength parameter (0-1) decides how strictly the structure is followed.

Key Parameters

Parameter Effect
control_strength 1.0 = strict structure, 0.3 = loose suggestion
start_percent / end_percent When during denoising the control applies (early = composition, late = details)
Model choice Match ControlNet version to your base model (SD1.5 vs SDXL vs FLUX)

Getting a Pose Image (OpenPose)

No drawing skills needed: use an OpenPose estimator (e.g., via ComfyUI's pose node or ControlNet's bundled preprocessor) to extract a skeleton from any photo, then reuse that skeleton with a completely different subject.

FAQ

ControlNet vs img2img? img2img changes the whole image; ControlNet changes only the specified structure (pose, edges) while the model fills everything else from the prompt.

Does ControlNet work with FLUX? Yes - Flux ControlNet models (e.g., Flux.1-dev-ControlNet-Canny) appeared through 2025 and are the current standard for FLUX conditioning.

Is ControlNet free? Yes - open source, runs locally in ComfyUI or Automatic1111 (164,300 stars).

相关文章
2026-06-29
高收益主线龙头策略——不花钱的数据,也能抓到龙头
2026-06-29
你笔记本里,藏着一个AI
2026-07-14
免费AI编程助手 2026 配置指南:VS Code 5分钟装 Continue、Copilot、Windsurf

💬 评论 (0)

暂无评论,来说两句吧~

登录后评论