Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

Minor updates

BlackNoizE404c65ed41412d6
diff --git a/rembg/sessions/ben_custom.py b/rembg/sessions/ben_custom.py
index a0c9841..4e67f23 100644
--- a/rembg/sessions/ben_custom.py
+++ b/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"
diff --git a/rembg/sessions/dis_custom.py b/rembg/sessions/dis_custom.py
index 6e2c19a..b16f647 100644
--- a/rembg/sessions/dis_custom.py
+++ b/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"
diff --git a/rembg/sessions/u2net_custom.py b/rembg/sessions/u2net_custom.py
index 4393138..6ad49fc 100644
--- a/rembg/sessions/u2net_custom.py
+++ b/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))