From 46bc6968b84d2017646656b38eee5b53e56da50d Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 2 Sep 2023 11:11:34 +1200 Subject: [PATCH] fix: ControlImage Dimension retrieval not working as intended --- .../controlNet/components/ControlNetImagePreview.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/invokeai/frontend/web/src/features/controlNet/components/ControlNetImagePreview.tsx b/invokeai/frontend/web/src/features/controlNet/components/ControlNetImagePreview.tsx index d3ab3c3817..d2c37445a3 100644 --- a/invokeai/frontend/web/src/features/controlNet/components/ControlNetImagePreview.tsx +++ b/invokeai/frontend/web/src/features/controlNet/components/ControlNetImagePreview.tsx @@ -104,22 +104,22 @@ const ControlNetImagePreview = ({ isSmall, controlNet }: Props) => { ]); const handleSetControlImageToDimensions = useCallback(() => { - if (!processedControlImage) { + if (!controlImage) { return; } if (activeTabName === 'unifiedCanvas') { dispatch( setBoundingBoxDimensions({ - width: processedControlImage.width, - height: processedControlImage.height, + width: controlImage.width, + height: controlImage.height, }) ); } else { - dispatch(setWidth(processedControlImage.width)); - dispatch(setHeight(processedControlImage.height)); + dispatch(setWidth(controlImage.width)); + dispatch(setHeight(controlImage.height)); } - }, [processedControlImage, activeTabName, dispatch]); + }, [controlImage, activeTabName, dispatch]); const handleMouseEnter = useCallback(() => { setIsMouseOverImage(true);