cv2.error: OpenCV(4.8.1) /io/opencv/modules/dnn/src/net_impl.cpp:279: error: (-204:Requested object

使用stable diffusion webui进行图片预处理(preporcess images)的时候,当勾选了自动聚焦裁减(Auto focal point crop)的时候发生了错误:

cv2.error: OpenCV(4.8.1) /io/opencv/modules/dnn/src/net_impl.cpp:279: error: (-204:Requested object was not found) Layer with requested id=-1 not found in function 'getLayerData'

是由于使用了opencv库进行聚焦的时候报错,原因是opencv版本问题,降低opencv版本即可解决:

pip install opencv-python==4.7.0.72

你可能感兴趣的:(opencv,dnn,webpack)