handle opencv conflict

This commit is contained in:
Vladimir Mandic
2024-02-09 09:46:52 -05:00
parent 5afd4b8eb8
commit 9150e9f82c
2 changed files with 9 additions and 6 deletions
+5 -5
View File
@@ -3,11 +3,6 @@
## Update for 2024-02-09
- **improvements**:
- **ONNX**:
- allow specify onnx default provider and cpu fallback
*settings -> diffusers*
- allow manual install of specific onnx flavor
*settings -> onnx*
- **FaceID** now works with multiple input images
- [DeepCache](https://github.com/horseee/DeepCache) model acceleration
it can produce massive speedups (2x-5x) with no overhead, but with some loss of quality
@@ -19,6 +14,11 @@
- **Control** units now have extra option to re-use current preview image as processor input
- improved `clip-skip` value handling in diffusers, thanks @AI-Casanova & @Disty0
now clip-skip range is 0-12 where previously lowest value was 1 (default is still 1)
- **ONNX**:
- allow specify onnx default provider and cpu fallback
*settings -> diffusers*
- allow manual install of specific onnx flavor
*settings -> onnx*
- add `--theme` cli param to force theme on startup
- **wiki**:
- updated benchmark notes for IPEX and Olive
+4 -1
View File
@@ -25,7 +25,10 @@ class EdgeDetector:
def __call__(self, input_image=None, pf=True, mode='edge', detect_resolution=512, image_resolution=512, output_type=None, **kwargs):
global ed # pylint: disable=global-statement
if ed is None:
ed = cv2.ximgproc.createEdgeDrawing()
try:
ed = cv2.ximgproc.createEdgeDrawing()
except Exception as e:
raise ImportError("Edge processor: invalid version of OpenCV found") from e
params = cv2.ximgproc.EdgeDrawing.Params()
params.PFmode = pf
ed.setParams(params)