AI漫剧制 | 第 6 天:画面构图:用AI控制镜头语言

第 6/60 天

引言

漫画分镜的好坏,七成看构图。同样的角色、同样的场景,换一个镜头角度就能传达完全不同的情绪——俯视让角色显得渺小无助,仰视赋予其威严力量,特写拉近读者与角色的心理距离。

在传统漫画中,构图是画师多年积累的肌肉记忆。但在AI漫画创作中,很多人面临一个共同的困境:AI生成的画面总是”千篇一律”——居中、平视、半身像,构图缺乏变化和叙事张力。 这并不是AI能力的上限,而是因为我们没有学会用提示词和参数精确控制镜头语言。

本文将深入讲解如何用AI工具控制四大构图要素:景别、角度、机位、画幅,并给出可直接复用的提示词模板和实战工作流。

核心概念

四大构图维度

维度 分类 叙事效果
景别 远景、全景、中景、近景、特写、大特写 控制信息量,从环境到细节的递进
角度 平视、俯视、仰视、鸟瞰、过肩 赋予画面情绪和立场
机位 正面、侧面、背面、斜侧、低角度 决定读者与角色的”关系”
画幅 宽屏、方形、竖条、跨页、出血 影响阅读节奏和视觉冲击

景别与叙事节奏

景别是漫画构图中最基础的维度,决定了读者”看到多少”和”感受到什么”:

信息量:远景 > 全景 > 中景 > 近景 > 特写
情感冲击:特写 > 近景 > 中景 > 全景 > 远景
  • 远景 / 大远景:建立场景,交代环境,角色极小甚至成为环境的一部分。适合开场和转场。
  • 全景:展现角色全身及周围环境,适合动作场面和角色出场。
  • 中景:膝盖以上,兼顾角色表情和肢体动作,叙事效率最高,漫画中最常用。
  • 近景:胸部以上,聚焦表情和情绪变化,适合对话和情感戏。
  • 特写:面部局部或物体细节,情绪爆发点,制造紧张感。
  • 大特写:眼睛、嘴唇、手指等极细微部位,极致情绪渲染。

角度与镜头语言

角度传达了”谁在看”和”如何看待”:

角度 提示词关键词 情绪效果
平视 eye level shot 中立、自然、代入感
俯视 high angle shot, looking down 弱势、渺小、脆弱
仰视 low angle shot, looking up 强大、威严、压迫感
鸟瞰 bird's eye view, top-down 全局、俯瞰、冷静
过肩 over the shoulder shot 对话参与感、空间定位
荷兰角 Dutch angle, tilted camera 不安、紧张、失衡

实战步骤

步骤 1:使用 Stable Diffusion 控制景别

在 Stable Diffusion WebUI 中,通过提示词精确控制景别是最直接的方式。以下是五种景别的提示词模板:

# 远景
epic wide shot, vast landscape, tiny figure in distance, cinematic lighting, masterpiece

# 全景
full body shot, standing pose, showing character from head to toe, environmental background

# 中景
medium shot, waist up, character in frame, detailed attire, dynamic pose

# 近景
close-up shot, chest up framing, facial expression focus, intricate details

# 特写
extreme close-up, eyes only, intense gaze, dramatic lighting, macro detail

步骤 2:结合 ControlNet 精确控制构图

ControlNet 的 OpenPose 和 Canny 模型可以精确控制角色姿态和画面边缘,确保构图符合预期。

ComfyUI 工作流 JSON 配置:

{
  "comfyui_workflow": {
    "nodes": [
      {"id": 1, "type": "CheckpointLoaderSimple", "model": "sd_xl_base_1.0"},
      {"id": 2, "type": "CLIPTextEncode", "text": "medium shot, waist up, confident posture, comic style"},
      {"id": 3, "type": "ControlNetLoader", "model": "control_v11p_sd15_openpose"},
      {"id": 4, "type": "OpenPosePreprocessor", "detect_hand": true, "detect_body": true, "detect_face": true},
      {"id": 5, "type": "KSampler", "steps": 30, "cfg": 7, "denoise": 1.0},
      {"id": 6, "type": "VAEDecode"}
    ],
    "connections": [
      {"from": 1, "to": 5, "slot": "model"},
      {"from": 2, "to": 5, "slot": "positive"},
      {"from": 3, "to": 5, "slot": "controlnet"},
      {"from": 4, "to": 3, "slot": "control_image"},
      {"from": 5, "to": 6, "slot": "samples"}
    ]
  }
}

步骤 3:使用 Python 脚本批量生成不同构图

以下脚本可以帮助你批量生成同一场景的不同构图版本:

#!/usr/bin/env python3
"""
批量生成漫画单页的多构图版本
"""
import json
import subprocess
import os
from pathlib import Path

# 场景描述
SCENE = "英雄站在废墟之上,手持长剑,面对远方敌人"
CHARACTER = "young male hero, long black hair, red cape, silver armor, determined expression"

# 构图配置
COMPOSITIONS = {
    "01_wide_establishing": {
        "prompt": f"epic wide shot, {SCENE}, tiny figure, vast ruins, dramatic sky, {CHARACTER}",
        "negative": "close-up, cropped, blurry, low quality",
        "width": 1344, "height": 768
    },
    "02_full_body": {
        "prompt": f"full body shot, {SCENE}, {CHARACTER}, standing heroically, full outfit visible",
        "negative": "close-up, cropped face, deformed",
        "width": 768, "height": 1024
    },
    "03_medium_action": {
        "prompt": f"medium shot, waist up, {CHARACTER}, swinging sword, dynamic action, motion blur, {SCENE}",
        "negative": "extra limbs, static, boring",
        "width": 768, "height": 1024
    },
    "04_close_up_emotion": {
        "prompt": f"close-up shot, chest up, {CHARACTER}, intense eyes, sweat on face, dramatic lighting, anger",
        "negative": "multiple faces, deformed eyes, blurry",
        "width": 768, "height": 1024
    },
    "05_extreme_eye": {
        "prompt": f"extreme close-up, hero's eye only, pupil reflection showing battlefield, high detail, cinematic",
        "negative": "face, mouth, nose, blurred, lowres",
        "width": 1024, "height": 768
    }
}

def generate_composition(name, config, output_dir):
    """调用 Stable Diffusion API 生成构图"""
    payload = {
        "prompt": config["prompt"],
        "negative_prompt": config["negative"],
        "width": config["width"],
        "height": config["height"],
        "steps": 30,
        "cfg_scale": 7,
        "sampler_name": "DPM++ 2M Karras",
        "seed": -1,
        "batch_size": 1
    }

    output_path = Path(output_dir) / f"{name}.png"
    # 这里假设 SD WebUI API 在 localhost:7860
    # resp = requests.post("http://localhost:7860/sdapi/v1/txt2img", json=payload)
    # with open(output_path, "wb") as f:
    #     f.write(base64.b64decode(resp.json()["images"][0]))
    print(f"[OK] 生成构图: {name} -> {output_path}")

# 批量生成
output_dir = "./comic_compositions"
os.makedirs(output_dir, exist_ok=True)

for name, config in COMPOSITIONS.items():
    generate_composition(name, config, output_dir)

print(f"全部生成完成!共 {len(COMPOSITIONS)} 种构图")

步骤 4:ComfyUI 构图切换工作流(YAML 配置)

以下是一个可复用的 ComfyUI 工作流配置模板,用于快速切换不同构图:

# comics_composition_workflow.yaml
# ComfyUI 漫画构图工作流配置
workflow_name: "漫画构图切换工作流"
version: "1.0"

model:
  base: "sd_xl_base_1.0.safetensors"
  refiner: "sd_xl_refiner_1.0.safetensors"
  vae: "sdxl_vae.safetensors"

controlnet:
  openpose: "control_v11p_sd15_openpose.pth"
  canny: "control_v11f1p_sd15_canny.pth"
  depth: "control_v11f1p_sd15_depth.pth"

composition_presets:
  establishing_shot:
    positive: "wide shot, vast landscape, cinematic, epic, masterpiece"
    width: 1472
    height: 832
    cfg: 8
  medium_shot:
    positive: "medium shot, waist up, detailed character, focused"
    width: 832
    height: 1216
    cfg: 7
  close_up:
    positive: "close-up shot, chest up, facial expression, intense, portrait"
    width: 832
    height: 1216
    cfg: 6.5
  action_shot:
    positive: "dynamic angle, motion blur, low angle shot, dramatic perspective"
    width: 1216
    height: 832
    cfg: 9

negative_prompt: "worst quality, low quality, blurry, deformed, bad anatomy, extra limbs, watermark"

步骤 5:Shell 脚本一键切换构图并生成

#!/bin/bash
# generate_composition.sh - 一键生成多构图漫画页面
# 用法: ./generate_composition.sh <prompt> <output_dir>

PROMPT="${1:-a hero standing on ruins}"
OUTPUT_DIR="${2:-./output}"
MODEL="sd_xl_base_1.0"
API_URL="http://localhost:7860/sdapi/v1/txt2img"

mkdir -p "$OUTPUT_DIR"

# 构图列表:景别|角度|宽|高|负提示词
COMPOSITIONS=(
  "wide|wide shot, bird's eye view|1344|768|blurry close-up"
  "fullbody|full body shot, low angle|768|1024|deformed cropped"
  "medium|medium shot, eye level|768|1024|extra limbs"
  "closeup|close-up, over the shoulder|832|1216|blurry face"
  "extreme|extreme close-up, Dutch angle|1024|768|multiple faces"
)

for comp in "${COMPOSITIONS[@]}"; do
  IFS='|' read -r name angle w h neg <<< "$comp"
  full_prompt="${angle}, ${PROMPT}, comic style, masterpiece"

  curl -s -X POST "$API_URL" 
    -H "Content-Type: application/json" 
    -d "{
      "prompt": "$full_prompt",
      "negative_prompt": "$neg",
      "width": $w,
      "height": $h,
      "steps": 25,
      "cfg_scale": 7
    }" | jq -r '.images[0]' | base64 -d > "${OUTPUT_DIR}/${name}.png"

  echo "[OK] 生成: ${OUTPUT_DIR}/${name}.png (${w}x${h}, ${angle})"
done

echo "全部构图生成完成!"

常见问题

Q1: AI 生成的构图总是”正中大脸”,怎么避免?

A: 在负面提示词中加入 centered composition, symmetrical, straight-on view,同时在正面提示词中加入 off-center composition, rule of thirds, dynamic framing。另外,使用 ControlNet 的 Canny 边缘检测可以强制构图偏离中心。

Q2: 仰视和俯视角度在 AI 中总是生成失败怎么办?

A: 除了在提示词中写 low angle shothigh angle shot,更有效的方法是使用 ControlNet OpenPose 手动调整姿态参考图——将人物骨架放置在画面底部(仰视)或顶部(俯视),AI 会自然适配角度。

Q3: 宽屏画幅(16:9)在漫画中如何应用?

A: 宽屏画幅适合用于氛围渲染和全景展示。在 SD 中设置 width: 1472, height: 832(约16:9),配合 panoramic, wide format 等提示词。在漫画排版中,宽屏图通常跨页使用,作为章节开头或关键场景。

Q4: 同一场景的多格构图如何保持一致性?

A: 使用 IP-Adapter + 角色参考图确保角色外观一致,同时通过 ControlNet 的 Depth 或 Canny 控制构图结构。推荐固定种子号(seed)并逐步微调,或使用 img2img 模式从已有构图衍生新构图。

Q5: 构图太”照片感”缺乏漫画张力怎么办?

A: 在提示词中加入 comic style, cel shading, thick ink outlines, manga screentones, dramatic perspective。同时,使用 LoRA 模型(如 comic-style-v2manga-perspective)可以显著增强漫画感。还可以在后期用 Photoshop 或 Clip Studio Paint 添加速度线和集中线。

总结

画面构图是AI漫画从”能看”到”好看”的关键分水岭。掌握镜头语言,你的AI漫画就不再是”同一张脸换不同背景”,而是真正有了叙事节奏和情感张力。

核心要点:
1. 景别决定信息量:远景交代环境,中景推进叙事,特写引爆情绪,四种景别交替使用是漫画分镜的基本功
2. 角度赋予立场:俯视、仰视、鸟瞰、过肩——每种角度都是一种”叙述者的态度”,选择合适的角度可以让读者不自觉地站在你设定好的视角
3. ControlNet 是构图利器:OpenPose 控制姿态,Canny 控制边缘,Depth 控制空间——三者配合使用,AI 构图不再是”抽奖”
4. 批量实验是捷径:使用脚本批量生成同一场景的不同构图版本,快速找到最适合叙事的镜头方案
5. 漫画感需要后期加持:AI 生成的画面往往偏”真实”或”插画”,需要通过速度线、集中线、对话框等漫画元素强化”漫画感”

下期预告: 第 7 天将深入探讨 AI 漫画的版权问题与法律边界——你的 AI 漫画角色到底属于谁?能否商用?如何避免侵权风险?敬请期待!


本文为「AI漫剧制」系列第 6 篇,共 60 篇。关注本系列,从零到精通掌握 AI 漫画制作全流程。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复

    暂无评论内容