pingsi/appsdev_lama_cleaner
0
1from typing import List2from pydantic import BaseModel3from lama_cleaner.server import main4 5class FakeArgs(BaseModel):6 host: str = "0.0.0.0"7 port: int = 78608 model: str = 'lama'9 hf_access_token: str = ""10 sd_enable_xformers: bool = False11 sd_disable_nsfw: bool = False12 sd_cpu_textencoder: bool = True13 sd_controlnet: bool = False14 sd_controlnet_method: str = "control_v11p_sd15_canny"15 sd_local_model_path: str = ""16 sd_run_local: bool = False17 local_files_only: bool = False18 cpu_offload: bool = False19 device: str = "cpu"20 gui: bool = False21 gui_size: List[int] = [1000, 1000]22 input: str = ''23 disable_model_switch: bool = True24 debug: bool = False25 no_half: bool = False26 disable_nsfw: bool = False27 enable_xformers: bool = False28 enable_interactive_seg: bool = True29 interactive_seg_model: str = "vit_b"30 interactive_seg_device: str = "cpu"31 enable_remove_bg: bool = False32 enable_anime_seg: bool = False33 enable_realesrgan: bool = False34 enable_gfpgan: bool = False35 gfpgan_device: str = "cpu"36 enable_restoreformer: bool = False37 enable_gif: bool = False38 quality: int = 9539 model_dir: str = None40 output_dir: str = None41 42if __name__ == "__main__":43 main(FakeArgs())44 