From d0f1a2d4dd9a126d8db59ff78053fe0f37730d51 Mon Sep 17 00:00:00 2001 From: xuzhijie Date: Tue, 12 May 2026 10:49:02 +0800 Subject: [PATCH] Prevent image expansion and detail hallucination in relighting Add explicit constraints to prevent AI model from: - Extending/outpainting beyond original image boundaries - Hallucinating details not visible in source (closed eyes, hidden areas) --- src/utils/lighting.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/lighting.ts b/src/utils/lighting.ts index 87a9492e..2b553296 100644 --- a/src/utils/lighting.ts +++ b/src/utils/lighting.ts @@ -344,6 +344,8 @@ export function buildOptimizedLightingPrompt( "Only change illumination: light direction, brightness, color temperature, shadows, highlights, reflections, and ambient lighting mood required by the lighting plan.", "Treat any preset or style wording as a lighting reference only, not permission to redesign the person, outfit, background, pose, scene, or photographic composition.", "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.", + "Do not hallucinate, invent, or complete any details that are not visible in the source image — if eyes, features, or areas are hidden, closed, covered, or obscured in the original, they must remain exactly as they are. Only adjust how light and shadow fall on the existing content.", + "Do NOT extend, expand, outpaint, or add any content outside the original image boundaries. The output must have the exact same frame, dimensions, and edge content as the source image — every edge pixel must match the original.", ]; // 打光参考图:第二张图片是打光参考,分析其光照风格应用到原图