2
0
Daniel Gatis 1 жил өмнө
parent
commit
bfafe9e9b4
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      rembg/bg.py

+ 2 - 2
rembg/bg.py

@@ -1,6 +1,6 @@
 import io
 from enum import Enum
-from typing import Any, List, Optional, Tuple, Union
+from typing import Any, List, Optional, Tuple, Union, cast
 
 import numpy as np
 import onnxruntime as ort
@@ -192,7 +192,7 @@ def fix_image_orientation(img: PILImage) -> PILImage:
     Returns:
         PILImage: The fixed image.
     """
-    return ImageOps.exif_transpose(img)
+    return cast(PILImage, ImageOps.exif_transpose(img))
 
 
 def download_models() -> None: