print plugin check_dep error

This commit is contained in:
Qing
2025-03-17 16:07:59 +08:00
parent 1ca6bd8e81
commit fddae35479

View File

@@ -95,8 +95,11 @@ class RemoveBG(BasePlugin):
def check_dep(self):
try:
import rembg
except ImportError:
return "RemoveBG is not installed, please install it first. pip install -U rembg"
except ImportError as e:
import traceback
error_msg = traceback.format_exc()
return f"Install rembg failed, Error details:\n{error_msg}"
def device_warning(self):
if self.device == Device.cuda and self.model_name not in [