Selaa lähdekoodia

Minor updates

BlackNoizE404 2 kuukautta sitten
vanhempi
commit
c65ed41412

+ 1 - 1
rembg/sessions/ben_custom.py

@@ -123,4 +123,4 @@ class BenCustomSession(BaseSession):
         Returns:
             str: The name of the model.
         """
-        return "ben-custom"
+        return "ben_custom"

+ 1 - 2
rembg/sessions/dis_custom.py

@@ -8,7 +8,6 @@ from PIL.Image import Image as PILImage
 
 from .base import BaseSession
 
-
 class DisCustomSession(BaseSession):
     """This is a class representing a custom session for the Dis model."""
 
@@ -89,4 +88,4 @@ class DisCustomSession(BaseSession):
         Returns:
             str: The name of the model.
         """
-        return "dis-custom"
+        return "dis_custom"

+ 1 - 1
rembg/sessions/u2net_custom.py

@@ -78,7 +78,7 @@ class U2netCustomSession(BaseSession):
         """
         model_path = kwargs.get("model_path")
         if model_path is None:
-            return
+            raise ValueError("model_path is required")
 
         return os.path.abspath(os.path.expanduser(model_path))