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

This commit is contained in:
psychedelicious 2023-06-09 13:54:23 +10:00
parent fe8f3381fc
commit 8c688f8e29

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