fix: clear protected side from scale drafts
This commit is contained in:
parent
acdc197b7e
commit
0f27bf1b10
@ -2678,9 +2678,12 @@ function suppressScaleAdjustProtectedFurnitureDarkAlpha(params: {
|
|||||||
luma < 150 &&
|
luma < 150 &&
|
||||||
(saturation < 0.55 || (r < 110 && g < 110 && b < 110));
|
(saturation < 0.55 || (r < 110 && g < 110 && b < 110));
|
||||||
const lowContrastDark = luma < 132 && saturation < 0.32;
|
const lowContrastDark = luma < 132 && saturation < 0.32;
|
||||||
const shouldClear = inProtectedSideArea
|
const shouldClear =
|
||||||
? neutralDark || lowContrastDark
|
inProtectedSideArea ||
|
||||||
: luma < 100 || (luma < 132 && saturation < 0.22);
|
neutralDark ||
|
||||||
|
lowContrastDark ||
|
||||||
|
luma < 100 ||
|
||||||
|
(luma < 132 && saturation < 0.22);
|
||||||
if (!shouldClear) continue;
|
if (!shouldClear) continue;
|
||||||
|
|
||||||
output[alphaIndex] = 0;
|
output[alphaIndex] = 0;
|
||||||
@ -3128,6 +3131,43 @@ async function buildScaleAdjustVisualLayoutGuideBuffer(params: {
|
|||||||
if (structureLockAppliedRef) {
|
if (structureLockAppliedRef) {
|
||||||
structureLockAppliedRef.value = true;
|
structureLockAppliedRef.value = true;
|
||||||
}
|
}
|
||||||
|
if (protectedPersonSide && sourceRaw) {
|
||||||
|
const washRight =
|
||||||
|
protectedPersonSide === "right"
|
||||||
|
? Math.round(placement.sourceFootprintBox.width * 0.74)
|
||||||
|
: placement.sourceFootprintBox.width;
|
||||||
|
const washLeft =
|
||||||
|
protectedPersonSide === "left"
|
||||||
|
? placement.sourceFootprintBox.left +
|
||||||
|
Math.round(placement.sourceFootprintBox.width * 0.26)
|
||||||
|
: placement.sourceFootprintBox.left;
|
||||||
|
const washWidth =
|
||||||
|
protectedPersonSide === "left"
|
||||||
|
? Math.max(
|
||||||
|
1,
|
||||||
|
placement.sourceFootprintBox.width -
|
||||||
|
Math.round(placement.sourceFootprintBox.width * 0.26)
|
||||||
|
)
|
||||||
|
: Math.max(1, washRight);
|
||||||
|
sourceFootprintBoxes.push({
|
||||||
|
left: washLeft,
|
||||||
|
top: placement.sourceFootprintBox.top,
|
||||||
|
width: washWidth,
|
||||||
|
height: placement.sourceFootprintBox.height,
|
||||||
|
background: estimateScaleAdjustBoxBackground({
|
||||||
|
box: {
|
||||||
|
left: washLeft,
|
||||||
|
top: placement.sourceFootprintBox.top,
|
||||||
|
width: washWidth,
|
||||||
|
height: placement.sourceFootprintBox.height,
|
||||||
|
},
|
||||||
|
raw: sourceRaw,
|
||||||
|
width: sourceWidth,
|
||||||
|
}),
|
||||||
|
innerOpacity: 0.5,
|
||||||
|
opacity: 0.72,
|
||||||
|
});
|
||||||
|
}
|
||||||
subjectWashComposites.push(structureLockedComposite.wash);
|
subjectWashComposites.push(structureLockedComposite.wash);
|
||||||
if (structureLockedComposite.compositeClip) {
|
if (structureLockedComposite.compositeClip) {
|
||||||
compositeClipComposites.push(structureLockedComposite.compositeClip);
|
compositeClipComposites.push(structureLockedComposite.compositeClip);
|
||||||
@ -4966,7 +5006,7 @@ export async function POST(request: NextRequest) {
|
|||||||
scaleAdjustPromptStrategy: isScaleAdjustOperation
|
scaleAdjustPromptStrategy: isScaleAdjustOperation
|
||||||
? scaleAdjustPatchReference
|
? scaleAdjustPatchReference
|
||||||
? useScaleAdjustFullFrameStructurePatch
|
? useScaleAdjustFullFrameStructurePatch
|
||||||
? "full-frame-structure-locked-draft-v6-protected-side-dark-cleared-one-shot"
|
? "full-frame-structure-locked-draft-v7-protected-side-cleared-one-shot"
|
||||||
: scaleAdjustPatchReference.structureLockedDraft
|
: scaleAdjustPatchReference.structureLockedDraft
|
||||||
? "ai-patch-workspace-structure-locked-draft-v87-subject-alpha-clipped-one-shot"
|
? "ai-patch-workspace-structure-locked-draft-v87-subject-alpha-clipped-one-shot"
|
||||||
: "ai-patch-workspace-draft-v75-soft-wipe-erase-ghost-one-shot"
|
: "ai-patch-workspace-draft-v75-soft-wipe-erase-ghost-one-shot"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user