IOPaint/lama_cleaner/__init__.py
2023-12-25 11:31:49 +08:00

16 lines
419 B
Python

import os
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
import warnings
warnings.simplefilter("ignore", UserWarning)
def entry_point():
# 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.cli import typer_app
typer_app()