Browse Source

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)
TEST-x
xuzhijie 2 months ago
parent
commit
d0f1a2d4dd
  1. 2
      src/utils/lighting.ts

2
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.", "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.", "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 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.",
]; ];
// 打光参考图:第二张图片是打光参考,分析其光照风格应用到原图 // 打光参考图:第二张图片是打光参考,分析其光照风格应用到原图

Loading…
Cancel
Save