You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It sometimes happens that w and/or h are of type str, not int. Then trying to compute (w + h) / 2 raises a TypeError, and the image dimensions are not updated.
Unfortunately this only happens sometimes, and I haven't yet figured out exactly when. The last time this hit me, I was in the img2img tab.
What I do know, however, is that this can be fixed by introducing an explicit typecast, like this:
It sometimes happens that
w
and/orh
are of typestr
, notint
. Then trying to compute(w + h) / 2
raises aTypeError
, and the image dimensions are not updated.Unfortunately this only happens sometimes, and I haven't yet figured out exactly when. The last time this hit me, I was in the img2img tab.
What I do know, however, is that this can be fixed by introducing an explicit typecast, like this:
The text was updated successfully, but these errors were encountered: