fix InstructPix2Pix

This commit is contained in:
Qing 2023-02-01 22:10:18 +08:00
parent 3cbce33956
commit 24bff09534

View File

@ -257,6 +257,26 @@ export default function Editor() {
_lineGroups.forEach(lineGroup => {
drawLines(ctx, lineGroup, 'white')
})
if (
(maskImage === undefined || maskImage === null) &&
_lineGroups.length === 0
) {
// For InstructPix2Pix without mask
drawLines(
ctx,
[
{
size: 9999999999,
pts: [
{ x: 0, y: 0 },
{ x: 99999999, y: 99999999 },
],
},
],
'white'
)
}
},
[context, maskCanvas]
)