关于 image-relighting
image-relighting 是使用 each::sense 改变照片光线、同时保留主体的技能。它支持影棚、自然、戏剧化、创意和电影感光效,也可调整阴影并让主体光线匹配新背景。
主要功能
- 01应用影棚和人像布光方案
- 02添加自然、黄金时刻或窗边光
- 03创建戏剧化、霓虹或电影感光效
- 04柔化阴影并提亮暗部
- 05使主体光线匹配背景
适用场景
- 01为日常人像营造影棚效果
- 02为户外照片添加日落光
- 03减弱自拍中的强烈阴影
- 04让人物匹配合成背景的光线
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ eachlabs/ skills --skill image-relighting安装后在 Claude Code 中输入/image-relighting确认已加载。
附带文件references/SSE-EVENTS.md
详细介绍
图像光照重塑
使用 each::sense 改变照片中的光照效果。这项技能可让你调整光照条件、添加专业影棚布光、营造戏剧性效果,或让光照与新背景匹配,同时保留原始主体。
功能
- 影棚布光:专业三点布光、伦勃朗布光、蝴蝶光和分割布光
- 自然光:黄金时段、蓝调时段、阴天和窗边光效果
- 戏剧性效果:硬阴影、轮廓光、剪影和明暗对照
- 创意布光:霓虹光、彩色滤光片、迪斯科灯光和艺术效果
- 环形灯:美妆和人像环形灯效果
- 电影感:黑色电影、大片风格和情绪化的电影感光照
- 阴影控制:去除生硬阴影、柔化现有光线、提亮暗部
- 环境匹配:让主体光照与新背景或场景相匹配
快速开始
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Add professional studio lighting to this portrait - soft key light from the left with subtle fill"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'
光照类型参考
| 光照风格 | 描述 | 适用场景 |
|---|---|---|
| 影棚(三点布光) | 主光、补光和轮廓光布置 | 专业人像 |
| 伦勃朗布光 | 面颊上的三角形光斑 | 戏剧性人像 |
| 蝴蝶光 | 从上方打光,鼻下形成阴影 | 美妆、魅力人像 |
| 分割布光 | 半边脸受光,半边脸处于阴影中 | 戏剧性、艺术性人像 |
| 环形灯 | 均匀、无阴影的正面光 | 美妆、社交媒体 |
| 黄金时段 | 温暖、柔和的定向光 | 户外人像、生活方式摄影 |
| 蓝调时段 | 清冷、柔和的环境光 | 情绪化、氛围感场景 |
| 窗边光 | 柔和、定向的自然光 | 自然风格人像 |
| 霓虹/彩色光 | 鲜艳的彩色光照 | 创意、时尚摄影 |
| 电影感 | 高反差、戏剧性阴影 | 电影风格图像 |
使用示例
1. 添加影棚布光
使用经典的三点布光,将随手拍的照片变成专业布光的人像照。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Add professional studio lighting to this portrait. Use a soft key light from 45 degrees left, fill light from the right to reduce shadows, and a subtle hair light from behind. Keep the background dark for a classic studio look."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'
2. 黄金时段/日落光照
添加温暖的金色阳光效果,仿佛照片拍摄于黄金时刻。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Relight this photo with golden hour lighting. Add warm, soft sunlight coming from the side, creating a beautiful golden glow on the skin. Include subtle lens flare and that magical sunset atmosphere."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/outdoor-photo.jpg"],
"mode": "max"
}'
3. 戏剧性侧光
使用强烈的定向光和深沉的阴影,营造大胆、戏剧性的人像效果。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Apply dramatic side lighting to this portrait. Strong directional light from the left creating deep shadows on the right side of the face. High contrast, moody atmosphere, like a film noir character portrait."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/headshot.jpg"],
"mode": "max"
}'
4. 柔和漫射光
营造讨喜、均匀的光照,尽量减少生硬阴影和皮肤瑕疵。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Relight this photo with soft, diffused lighting. Like shooting through a large softbox or on an overcast day. Even, flattering light with minimal shadows, perfect for beauty photography. Keep the skin looking natural and glowing."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/beauty-shot.jpg"],
"mode": "max"
}'
5. 霓虹/彩色光
添加鲜艳、富有创意的彩色光照,营造时尚摄影或艺术效果。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Add neon lighting to this portrait. Cyberpunk style with pink/magenta light from the left and blue/cyan light from the right. Create that futuristic nightclub vibe with vibrant colored reflections on the skin and a dark background."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/model-photo.jpg"],
"mode": "max"
}'
6. 自然窗边光
模拟透过窗户照入的优美柔和自然光。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Relight this portrait with natural window light. Soft, directional daylight coming from a large window on the left side. Create gentle shadows and that beautiful, airy natural light photographers love. Slightly cool color temperature."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/indoor-portrait.jpg"],
"mode": "max"
}'
7. 环形灯效果
添加美妆和社交媒体内容中常见的标志性环形灯效果。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Apply ring light effect to this selfie. Even, frontal lighting with that signature circular catchlight in the eyes. Minimize shadows under the nose and chin, create that beauty influencer look with glowing, even skin illumination."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/selfie.jpg"],
"mode": "max"
}'
8. 电影感光照
营造具有戏剧性反差和氛围的电影级光照效果。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Apply cinematic lighting to this portrait. Hollywood movie style with strong key light, deep shadows, and subtle rim light separating the subject from background. Moody and atmospheric like a scene from a thriller. Add subtle haze/atmosphere in the air."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/actor-photo.jpg"],
"mode": "max"
}'
9. 去除生硬阴影
通过柔化或去除不讨喜的生硬阴影,改善布光不佳的照片。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Remove the harsh shadows from this photo. The midday sun created unflattering dark shadows under the eyes and nose. Relight it with softer, more even lighting while keeping a natural outdoor look. Fill in the shadow areas without making it look flat."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/harsh-shadow-photo.jpg"],
"mode": "max"
}'
10. 让光照与背景匹配
调整主体光照,使其与新环境或合成背景自然融合。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Relight this person to match the beach sunset background. The subject was photographed indoors with flat lighting, but needs to look like they are actually on the beach during golden hour. Match the warm color temperature, add rim lighting from the setting sun behind them, and ensure the shadows are consistent with the background lighting direction."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/subject-indoor.jpg",
"https://example.com/beach-sunset-background.jpg"
],
"mode": "max"
}'
多轮光照微调
使用 session_id,通过多次请求反复微调光照:
# Initial relighting
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Add dramatic studio lighting to this portrait with strong shadows"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"session_id": "lighting-session-001"
}'
# Refine the result
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "The shadows are too harsh. Can you soften them slightly while keeping the dramatic feel? Also add a subtle blue rim light on the shadow side."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "lighting-session-001"
}'
# Try a variation
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create another version with warmer color temperature, like tungsten lighting"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "lighting-session-001"
}'
模式选择
生成前询问用户:
“你想要快速且经济,还是追求高品质?”
| 模式 | 适用场景 | 速度 | 质量 |
|---|---|---|---|
max | 最终交付成果、客户项目、作品集图片 | 较慢 | 最高 |
eco | 快速预览、测试光照创意、批量处理 | 较快 | 良好 |
获取最佳效果的提示技巧
请求重新打光时,请提供以下细节,以获得最佳效果:
- 光线方向:指定光线来自何处(左侧、右侧、上方、后方)
- 光线质感:硬光/柔光、漫射光、高光
- 色温:暖色调(金色)、冷色调(蓝色)、中性色调或特定颜色
- 阴影强度:浓重阴影、柔和阴影、无阴影
- 氛围/情绪:戏剧化、浪漫、专业、前卫
- 参考风格:“类似《Vogue》时尚大片”或“黑色电影风格”
提示词结构示例
"Relight this [subject type] with [lighting style].
Light coming from [direction] with [quality] shadows.
[Color temperature] color temperature.
Mood: [atmosphere description].
[Additional requirements]"
错误处理
| 错误 | 原因 | 解决方案 |
|---|---|---|
Failed to create prediction: HTTP 422 | 余额不足 | 前往 eachlabs.ai 充值 |
| 内容政策违规 | 内容被禁止 | 确保图像符合内容政策 |
| 超时 | 生成内容复杂 | 将客户端超时设置为至少 10 分钟 |
| 打光效果不佳 | 提示词含糊 | 更具体地说明光线方向、质感和氛围 |
相关技能
each-sense- 核心 API 文档product-photo-generation- 电商产品打光portrait-enhancement- 人像修饰与增强background-replacement- 更换背景并匹配光线
评论
支持 Markdown