IOPaint/lama_cleaner/__init__.py

19 lines
488 B
Python
Raw Normal View History

2023-03-19 15:40:23 +01:00
import os
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
import warnings
2023-03-19 15:40:23 +01:00
warnings.simplefilter("ignore", UserWarning)
2022-04-18 09:01:10 +02:00
from lama_cleaner.parse_args import parse_args
2023-03-19 15:40:23 +01:00
2022-04-18 09:01:10 +02:00
def entry_point():
args = parse_args()
2023-01-14 14:36:32 +01:00
# 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
2023-03-19 15:40:23 +01:00
2022-04-18 09:01:10 +02:00
main(args)