fix: preserve source crop for structure scale edits
This commit is contained in:
parent
8ecece64e1
commit
5a4e087b3d
@ -2020,14 +2020,16 @@ async function buildScaleAdjustStructureLockedComposite(params: {
|
|||||||
sourceWidth,
|
sourceWidth,
|
||||||
userId,
|
userId,
|
||||||
} = params;
|
} = params;
|
||||||
const rmbgComposite = await buildScaleAdjustRmbgStructureLockedComposite({
|
const rmbgComposite = includePersonPixels
|
||||||
placement,
|
? null
|
||||||
raw,
|
: await buildScaleAdjustRmbgStructureLockedComposite({
|
||||||
sourceBuffer,
|
placement,
|
||||||
sourceImageUrl,
|
raw,
|
||||||
sourceWidth,
|
sourceBuffer,
|
||||||
userId,
|
sourceImageUrl,
|
||||||
});
|
sourceWidth,
|
||||||
|
userId,
|
||||||
|
});
|
||||||
if (rmbgComposite) return rmbgComposite;
|
if (rmbgComposite) return rmbgComposite;
|
||||||
|
|
||||||
const initialMask = buildScaleAdjustStructureInitialMask({
|
const initialMask = buildScaleAdjustStructureInitialMask({
|
||||||
@ -3610,8 +3612,7 @@ export async function POST(request: NextRequest) {
|
|||||||
: [];
|
: [];
|
||||||
const useScaleAdjustPatchTargetDraftPrimary = Boolean(scaleAdjustPatchReference);
|
const useScaleAdjustPatchTargetDraftPrimary = Boolean(scaleAdjustPatchReference);
|
||||||
const includeScaleAdjustPatchSourceReference =
|
const includeScaleAdjustPatchSourceReference =
|
||||||
Boolean(scaleAdjustPatchReference) &&
|
Boolean(scaleAdjustPatchReference);
|
||||||
scaleAdjustPatchReference?.structureLockedDraft !== true;
|
|
||||||
const prompt = isScaleAdjustOperation
|
const prompt = isScaleAdjustOperation
|
||||||
? scaleAdjustPatchReference
|
? scaleAdjustPatchReference
|
||||||
? buildScaleAdjustPatchPrompt(
|
? buildScaleAdjustPatchPrompt(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user