仔细看那张图:人物左脸被照亮,但背景太阳明显在右侧;下巴的阴影指一个方向,墙上的阴影指另一个方向。哪怕你还说不出哪里不对,大脑已经判定”错了”——人类对光影一致性极度敏感。
这通常发生在 Prompt 里描述了互相冲突的光源、风格 LoRA 自带固定打光、或者一句话里塞了”金色时刻 + 棚拍 + 戏剧侧光”等等多个矛盾的光线词。
常见原因
按命中率从高到低:
1. 同一 Prompt 里写了多个光源方向
"portrait lit from the left, golden hour sun behind subject, dramatic side light from right, studio softbox key light"
你刚刚告诉模型”光从 4 个方向来”。它没办法同时满足,结果就是”四面八方都有光”。
如何判断:扫一遍 Prompt,看光相关的词附近有没有 left、right、behind、front、top、bottom。出现两个以上方向,就是冲突。
2. 时段 / 天气描述自相矛盾
"golden hour, overcast, dramatic sunlight, soft diffused, night neon"
每个词都隐含了光的方向和质感:金色时刻 = 暖低角;阴天 = 无方向柔光;夜间霓虹 = 多个有色点光源。混在一起模型就乱了。
如何判断:找 Prompt 里多于一个的时段 / 天气词。只留一个。
3. 风格 LoRA 的固定打光和你描述的打光打架
很多风格 LoRA(尤其动漫、“cinematic”、时尚大片)训练数据本身有统一光线。LoRA 想强加它学到的光,你的 Prompt 又拉它去别处,结果半 LoRA 半 Prompt。
如何判断:同 Prompt,关掉 LoRA 光线统一,开 LoRA 就冲突——LoRA 就是源头。
4. 参考图光线和 Prompt 描述不一致
img2img / IP-Adapter / --cref 用了一张光线和你 Prompt 描述不同的参考图。模型部分听参考、部分听文字 → 冲突。
如何判断:去掉参考图、跑纯文字。如果光线一致了,参考图是问题。
5. 根本没描述光源,但描述了多个环境
不描述光线时,模型自己挑——可如果 Prompt 里有 cinematic portrait at home, sunset outside the window, lamp on desk 这种”多环境暗示”,它会编出多个互相冲突的光源去”合理化”所有环境。
如何判断:Prompt 没显式光线描述,但提到了多个环境元素。
最短修复路径
Step 1:用摄影术语锁一个主光
把”形容词汤”替换成精确的摄影规格:方向 + 质感 + 时段 / 来源 + 色温。
差 → 好:
| 差(形容词汤) | 好(摄影规格) |
|---|---|
golden hour, dramatic, side lit, cinematic | rim light from camera left, low-angle golden hour sun (5pm), warm 3200K, soft shadow falloff |
studio portrait, beautiful lighting | single softbox key light at 45° camera right, fill card on left at -1 stop, no rim |
moody, cinematic, dramatic | single hard light from camera left, motivated by window, deep shadow on shadow side, 5600K daylight |
可用摄影术语:
- 方向:
from camera left、from camera right、from above、from behind、front-lit - 质感:
hard light、soft diffused、dappled、direct sunlight、bounced fill - 来源:
golden hour sun、window light、softbox、practical lamp、neon signs - 色温:
3200K tungsten warm、5600K daylight neutral、2200K candle warm
Step 2:选定一个时段,别贪心
不要 golden hour overcast neon dawn——挑一个:
golden hour→ 暖 + 低角 + 有方向overcast→ 柔 + 无方向 + 偏冷midday sun→ 硬 + 顶 + 中性night urban neon→ 多个冷色点光源studio→ 可控,选 softbox 或 hard
Step 3:LoRA 冲突时降权重
风格 LoRA 把光焊死时:
# A1111 / Forge 语法
<lora:my_style:0.5> # 原来 0.9 → 降到 0.5
# ComfyUI
LoRA loader → strength 0.5
0.4–0.6 通常足够保留风格味道又不锁死光线。
Step 4:负向 Prompt 拦冲突(仅 SD 系)
conflicting lighting, mixed shadows, multiple light sources,
inconsistent shadow direction, multiple sun positions,
contradictory lighting, ambiguous light source
Step 5:用 ControlNet Depth/Normal 强制阴影方向
需要严控时,给 ControlNet 喂一张光线设置正确的 depth 或 normal 图:
# ComfyUI
- ControlNet Depth 或 Normal-from-image
- 喂一张 3D 渲染或样片,光线就是你要的方向
- 强度 0.5–0.7
Step 6:用 inpaint 局部修
90% 的图都对,就那个墙影方向错——别整张重画:
- Mask 错的那块(比如方向反的墙影)
- inpaint Prompt 明确写正确方向
- Denoise
0.5–0.7保留周围环境
预防建议
- 先描述主光,辅光 / 轮廓光只在必要时再补
- 用摄影术语(
rim light from camera left, 5600K)替代形容词(dramatic lighting) - 给每种常见情绪存一段”光线预设”片段(金色时刻 / 阴天 / 棚拍 softbox / 夜间霓虹)
- 用风格 LoRA 时,先看它默认打的什么光,再按这个光去配 Prompt,别反着写