_
File size: 644 Bytes
da3eeba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os

os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"

import warnings  # noqa: E402

warnings.filterwarnings("ignore", category=UserWarning, module="pydantic")
warnings.filterwarnings("ignore", category=UserWarning, module="lama_cleaner")

from lama_cleaner.parse_args import parse_args  # noqa: E402


def entry_point():
    args = parse_args()
    # To make os.environ["XDG_CACHE_HOME"] = args.model_cache_dir works for diffusers
    # https://github.com/huggingface/diffusers/blob/be99201a567c1ccd841dc16fb24e88f7f239c187/src/diffusers/utils/constants.py#L18
    from lama_cleaner.server import main

    main(args)