- Reference image is always sent as second image to model (not limited
to smart free mode), original image stays as first image
- Prompt explicitly tells model: first image is source, second is
lighting reference to analyze and apply
- Preview always shows original image, reference image no longer
replaces it in the globe preview
- Show uploaded reference image thumbnail with clear button in UI
- Add rim light prompt with specific position description and color
@ -332,7 +336,7 @@ export function buildOptimizedLightingPrompt(
// 严格约束:锁定人物身份、构图、场景,只允许改变光照
constconstraints=[
"STRICT image-to-image relighting task: use the uploaded image as the locked source image.",
"STRICT image-to-image relighting task: the FIRST image is the source image to be relit — do not modify its content.",
userIntent,
lightingPrompt,
"The output must show the same exact person from the source image: identical face identity, facial features, age, expression, hair, body shape, hands, pose, clothing, accessories, and camera/phone.",
@ -342,10 +346,10 @@ export function buildOptimizedLightingPrompt(
"Do not add or remove people or objects, do not beautify or re-age the person, do not replace the face, do not change hairstyle or clothing, do not crop the subject, and do not create a different scene.",
];
// 智能参考图模式:告知模型第二张图片是打光参考
if(smartRef){
// 打光参考图:第二张图片是打光参考,分析其光照风格应用到原图
if(hasRefImage){
constraints.push(
"If a second image is provided, use it as the lighting reference — match its lighting style, direction, color temperature, and mood."
"The SECOND image is the lighting reference — analyze its lighting style, direction, color temperature, shadows, and mood, then apply the same lighting to the FIRST image."