Skip to content

Commit 4092d05

Browse files
fix: ControlImage Dimension retrieval not working as intended (#4432)
## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [ ] Bug Fix - [ ] Optimization - [ ] Documentation Update - [ ] Community Node Submission ## Have you discussed this change with the InvokeAI team? - [ ] Yes - [ ] No, because: ## Have you updated all relevant documentation? - [ ] Yes - [ ] No ## Description ## Related Tickets & Documents <!-- For pull requests that relate or close an issue, please include them below. For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue. --> - Related Issue # - Closes # ## QA Instructions, Screenshots, Recordings <!-- Please provide steps on how to test changes, any hardware or software specifications as well as any other pertinent information. --> ## Added/updated tests? - [ ] Yes - [ ] No : _please replace this line with details on why tests have not been included_ ## [optional] Are there any post deployment tasks we need to perform?
2 parents 26f7ade + 46bc696 commit 4092d05

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)