fix: use source image for product lock background edit

This commit is contained in:
134 2026-07-06 07:42:11 +08:00
parent fde5661436
commit abfc813e42

View File

@ -5362,7 +5362,6 @@ export async function POST(request: NextRequest) {
scalePercent, scalePercent,
{ width: sourceWidth, height: sourceHeight }, { width: sourceWidth, height: sourceHeight },
{ {
draftInput: useScaleAdjustProductLockMaskEdit,
maskEdit: useScaleAdjustProductLockMaskEdit, maskEdit: useScaleAdjustProductLockMaskEdit,
} }
) )
@ -5437,18 +5436,16 @@ export async function POST(request: NextRequest) {
? useScaleAdjustProductLockComposite ? useScaleAdjustProductLockComposite
? useScaleAdjustProductLockMaskEdit ? useScaleAdjustProductLockMaskEdit
? [ ? [
scaleAdjustPatchReference.backgroundPlateFullUrl || sourceImageUrl,
scaleAdjustPatchReference.targetDraftFullUrl ||
sourceImageUrl,
...scaleAdjustCropReferenceImageUrls, ...scaleAdjustCropReferenceImageUrls,
...manualRegionReferenceImageUrls, ...manualRegionReferenceImageUrls,
] ]
: [ : [
sourceImageUrl, sourceImageUrl,
scaleAdjustPatchReference.backgroundPlateFullUrl as string, scaleAdjustPatchReference.backgroundPlateFullUrl as string,
...scaleAdjustCropReferenceImageUrls, ...scaleAdjustCropReferenceImageUrls,
...manualRegionReferenceImageUrls, ...manualRegionReferenceImageUrls,
] ]
: [ : [
sourceImageUrl, sourceImageUrl,
scaleAdjustPatchReference.targetDraftFullUrl as string, scaleAdjustPatchReference.targetDraftFullUrl as string,
@ -5597,7 +5594,7 @@ export async function POST(request: NextRequest) {
scaleAdjustPatchReferenceOrder: scaleAdjustPatchReferenceOrder:
scaleAdjustPatchReference && useScaleAdjustFullFrameStructurePatch scaleAdjustPatchReference && useScaleAdjustFullFrameStructurePatch
? useScaleAdjustProductLockMaskEdit ? useScaleAdjustProductLockMaskEdit
? "product-lock-background-plate-edit-mask" ? "product-lock-source-edit-mask"
: "full-source-full-target-draft" : "full-source-full-target-draft"
: scaleAdjustPatchReference && useScaleAdjustPatchTargetDraftPrimary : scaleAdjustPatchReference && useScaleAdjustPatchTargetDraftPrimary
? includeScaleAdjustPatchSourceReference ? includeScaleAdjustPatchSourceReference
@ -5689,7 +5686,7 @@ export async function POST(request: NextRequest) {
? scaleAdjustPatchReference ? scaleAdjustPatchReference
? useScaleAdjustProductLockComposite ? useScaleAdjustProductLockComposite
? useScaleAdjustProductLockMaskEdit ? useScaleAdjustProductLockMaskEdit
? "product-lock-background-plate-mask-edit-rmbg-one-shot" ? "product-lock-source-mask-edit-rmbg-one-shot"
: "product-lock-background-plate-rmbg-v2-source-patch-one-shot" : "product-lock-background-plate-rmbg-v2-source-patch-one-shot"
: useScaleAdjustFullFrameStructurePatch : useScaleAdjustFullFrameStructurePatch
? "full-frame-source-locked-target-guide-v8-one-shot" ? "full-frame-source-locked-target-guide-v8-one-shot"