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,
|
||||
userId,
|
||||
} = params;
|
||||
const rmbgComposite = await buildScaleAdjustRmbgStructureLockedComposite({
|
||||
placement,
|
||||
raw,
|
||||
sourceBuffer,
|
||||
sourceImageUrl,
|
||||
sourceWidth,
|
||||
userId,
|
||||
});
|
||||
const rmbgComposite = includePersonPixels
|
||||
? null
|
||||
: await buildScaleAdjustRmbgStructureLockedComposite({
|
||||
placement,
|
||||
raw,
|
||||
sourceBuffer,
|
||||
sourceImageUrl,
|
||||
sourceWidth,
|
||||
userId,
|
||||
});
|
||||
if (rmbgComposite) return rmbgComposite;
|
||||
|
||||
const initialMask = buildScaleAdjustStructureInitialMask({
|
||||
@ -3610,8 +3612,7 @@ export async function POST(request: NextRequest) {
|
||||
: [];
|
||||
const useScaleAdjustPatchTargetDraftPrimary = Boolean(scaleAdjustPatchReference);
|
||||
const includeScaleAdjustPatchSourceReference =
|
||||
Boolean(scaleAdjustPatchReference) &&
|
||||
scaleAdjustPatchReference?.structureLockedDraft !== true;
|
||||
Boolean(scaleAdjustPatchReference);
|
||||
const prompt = isScaleAdjustOperation
|
||||
? scaleAdjustPatchReference
|
||||
? buildScaleAdjustPatchPrompt(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user