From 36237d6866f5d0d1112fb57dc026dcb452f6238b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 24 Jun 2023 17:46:10 +1000 Subject: [PATCH] fix(ui): fix control image sizes they were all weird --- .../controlNet/components/ControlNet.tsx | 7 +- .../components/ControlNetImagePreview.tsx | 77 +++++++++---------- 2 files changed, 40 insertions(+), 44 deletions(-) diff --git a/invokeai/frontend/web/src/features/controlNet/components/ControlNet.tsx b/invokeai/frontend/web/src/features/controlNet/components/ControlNet.tsx index 927daa9dc04..87384335d32 100644 --- a/invokeai/frontend/web/src/features/controlNet/components/ControlNet.tsx +++ b/invokeai/frontend/web/src/features/controlNet/components/ControlNet.tsx @@ -172,7 +172,10 @@ const ControlNet = (props: ControlNetProps) => { aspectRatio: '1/1', }} > - + )} @@ -181,7 +184,7 @@ const ControlNet = (props: ControlNetProps) => { { - const { imageSx } = props; + const { height } = props; const { controlNetId, controlImage: controlImageName, @@ -84,10 +84,6 @@ const ControlNetImagePreview = (props: Props) => { setIsMouseOverImage(false); }, []); - const shouldShowProcessedImageBackdrop = - Number(controlImage?.width) > Number(processedControlImage?.width) || - Number(controlImage?.height) > Number(processedControlImage?.height); - const shouldShowProcessedImage = controlImage && processedControlImage && @@ -96,54 +92,51 @@ const ControlNetImagePreview = (props: Props) => { processorType !== 'none'; return ( - - {shouldShowProcessedImage && ( - + - {shouldShowProcessedImageBackdrop && ( - - )} - - - )} + /> + {pendingControlImages.includes(controlNetId) && ( { /> )} - + ); };