add remove bg model selection
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from iopaint.schema import ApiConfig, Device, InteractiveSegModel, RealESRGANModel
|
||||
from typing import List
|
||||
|
||||
INSTRUCT_PIX2PIX_NAME = "timbrooks/instruct-pix2pix"
|
||||
KANDINSKY22_NAME = "kandinsky-community/kandinsky-2-2-decoder-inpaint"
|
||||
@@ -57,7 +54,7 @@ CPU_TEXTENCODER_HELP = """
|
||||
Run diffusion models text encoder on CPU to reduce vRAM usage.
|
||||
"""
|
||||
|
||||
SD_CONTROLNET_CHOICES = [
|
||||
SD_CONTROLNET_CHOICES: List[str] = [
|
||||
"lllyasviel/control_v11p_sd15_canny",
|
||||
# "lllyasviel/control_v11p_sd15_seg",
|
||||
"lllyasviel/control_v11p_sd15_openpose",
|
||||
@@ -113,38 +110,9 @@ Quality of image encoding, 0-100. Default is 95, higher quality will generate la
|
||||
|
||||
INTERACTIVE_SEG_HELP = "Enable interactive segmentation using Segment Anything."
|
||||
INTERACTIVE_SEG_MODEL_HELP = "Model size: mobile_sam < vit_b < vit_l < vit_h. Bigger model size means better segmentation but slower speed."
|
||||
REMOVE_BG_HELP = "Enable remove background. Always run on CPU"
|
||||
ANIMESEG_HELP = "Enable anime segmentation. Always run on CPU"
|
||||
REMOVE_BG_HELP = "Enable remove background plugin. Always run on CPU"
|
||||
ANIMESEG_HELP = "Enable anime segmentation plugin. Always run on CPU"
|
||||
REALESRGAN_HELP = "Enable realesrgan super resolution"
|
||||
GFPGAN_HELP = "Enable GFPGAN face restore. To also enhance background, use with --enable-realesrgan"
|
||||
RESTOREFORMER_HELP = "Enable RestoreFormer face restore. To also enhance background, use with --enable-realesrgan"
|
||||
GIF_HELP = "Enable GIF plugin. Make GIF to compare original and cleaned image"
|
||||
|
||||
default_configs = dict(
|
||||
host="127.0.0.1",
|
||||
port=8080,
|
||||
model=DEFAULT_MODEL,
|
||||
model_dir=DEFAULT_MODEL_DIR,
|
||||
no_half=False,
|
||||
low_mem=False,
|
||||
cpu_offload=False,
|
||||
disable_nsfw_checker=False,
|
||||
local_files_only=False,
|
||||
cpu_textencoder=False,
|
||||
device=Device.cuda,
|
||||
input=None,
|
||||
output_dir=None,
|
||||
quality=95,
|
||||
enable_interactive_seg=False,
|
||||
interactive_seg_model=InteractiveSegModel.vit_b,
|
||||
interactive_seg_device=Device.cpu,
|
||||
enable_remove_bg=False,
|
||||
enable_anime_seg=False,
|
||||
enable_realesrgan=False,
|
||||
realesrgan_device=Device.cpu,
|
||||
realesrgan_model=RealESRGANModel.realesr_general_x4v3,
|
||||
enable_gfpgan=False,
|
||||
gfpgan_device=Device.cpu,
|
||||
enable_restoreformer=False,
|
||||
restoreformer_device=Device.cpu,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user