Skip to content

Commit 46bc696

Browse files
fix: ControlImage Dimension retrieval not working as intended
1 parent 26f7ade commit 46bc696

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

invokeai/frontend/web/src/features/controlNet/components/ControlNetImagePreview.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,22 @@ const ControlNetImagePreview = ({ isSmall, controlNet }: Props) => {
104104
]);
105105

106106
const handleSetControlImageToDimensions = useCallback(() => {
107-
if (!processedControlImage) {
107+
if (!controlImage) {
108108
return;
109109
}
110110

111111
if (activeTabName === 'unifiedCanvas') {
112112
dispatch(
113113
setBoundingBoxDimensions({
114-
width: processedControlImage.width,
115-
height: processedControlImage.height,
114+
width: controlImage.width,
115+
height: controlImage.height,
116116
})
117117
);
118118
} else {
119-
dispatch(setWidth(processedControlImage.width));
120-
dispatch(setHeight(processedControlImage.height));
119+
dispatch(setWidth(controlImage.width));
120+
dispatch(setHeight(controlImage.height));
121121
}
122-
}, [processedControlImage, activeTabName, dispatch]);
122+
}, [controlImage, activeTabName, dispatch]);
123123

124124
const handleMouseEnter = useCallback(() => {
125125
setIsMouseOverImage(true);

0 commit comments

Comments
 (0)