feat(ui): skip resize on img2img if not needed (#3520)

This commit is contained in:
blessedcoolant 2023-06-09 15:56:22 +12:00 committed by GitHub
commit 07c49a5726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -342,7 +342,10 @@ export const buildImageToImageGraph = (state: RootState): Graph => {
});
}
if (shouldFitToWidthHeight) {
if (
shouldFitToWidthHeight &&
(initialImage.width !== width || initialImage.height !== height)
) {
// The init image needs to be resized to the specified width and height before being passed to `IMAGE_TO_LATENTS`
// Create a resize node, explicitly setting its image