add remove bg model selection

This commit is contained in:
Qing
2024-02-08 16:49:54 +08:00
parent cf9ceea4e6
commit 8060e16c70
19 changed files with 915 additions and 222 deletions

View File

@@ -16,6 +16,7 @@ def build_plugins(
interactive_seg_model: InteractiveSegModel,
interactive_seg_device: Device,
enable_remove_bg: bool,
remove_bg_model: str,
enable_anime_seg: bool,
enable_realesrgan: bool,
realesrgan_device: Device,
@@ -35,7 +36,7 @@ def build_plugins(
if enable_remove_bg:
logger.info(f"Initialize {RemoveBG.name} plugin")
plugins[RemoveBG.name] = RemoveBG()
plugins[RemoveBG.name] = RemoveBG(remove_bg_model)
if enable_anime_seg:
logger.info(f"Initialize {AnimeSeg.name} plugin")