File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
invokeai/frontend/web/src/features/controlLayers/util Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,9 @@ const updateInitialImageLayerImageAttrs = (
483483 konvaImage : Konva . Image ,
484484 reduxLayer : InitialImageLayer
485485) => {
486+ // Konva erroneously reports NaN for width and height when the stage is hidden. This causes errors when caching,
487+ // but it doesn't seem to break anything.
488+ // TODO(psyche): Investigate and report upstream.
486489 const newWidth = stage . width ( ) / stage . scaleX ( ) ;
487490 const newHeight = stage . height ( ) / stage . scaleY ( ) ;
488491 if (
@@ -618,6 +621,9 @@ const updateControlNetLayerImageAttrs = (
618621 reduxLayer : ControlAdapterLayer
619622) => {
620623 let needsCache = false ;
624+ // Konva erroneously reports NaN for width and height when the stage is hidden. This causes errors when caching,
625+ // but it doesn't seem to break anything.
626+ // TODO(psyche): Investigate and report upstream.
621627 const newWidth = stage . width ( ) / stage . scaleX ( ) ;
622628 const newHeight = stage . height ( ) / stage . scaleY ( ) ;
623629 const hasFilter = konvaImage . filters ( ) !== null && konvaImage . filters ( ) . length > 0 ;
You can’t perform that action at this time.
0 commit comments