This commit is contained in:
Qing 2023-02-26 16:40:57 +08:00
parent d5c77fcede
commit 6cc1f87a65
2 changed files with 11 additions and 4 deletions

View File

@ -53,9 +53,16 @@ def download_model(url, model_md5: str = None):
if model_md5 == _md5: if model_md5 == _md5:
logger.info(f"Download model success, md5: {_md5}") logger.info(f"Download model success, md5: {_md5}")
else: else:
logger.error( try:
f"Download model failed, md5: {_md5}, expected: {model_md5}. Please delete model at {cached_file} and restart lama-cleaner" os.remove(cached_file)
) logger.error(
f"Model md5: {_md5}, expected md5: {model_md5}, wrong model deleted. Please restart lama-cleaner."
f"If you still have errors, please try download model manually first https://lama-cleaner-docs.vercel.app/install/download_model_manually.\n"
)
except:
logger.error(
f"Model md5: {_md5}, expected md5: {model_md5}, please delete {cached_file} and restart lama-cleaner."
)
exit(-1) exit(-1)
return cached_file return cached_file

View File

@ -21,7 +21,7 @@ def load_requirements():
# https://setuptools.readthedocs.io/en/latest/setuptools.html#including-data-files # https://setuptools.readthedocs.io/en/latest/setuptools.html#including-data-files
setuptools.setup( setuptools.setup(
name="lama-cleaner", name="lama-cleaner",
version="0.36.2", version="0.36.3",
author="PanicByte", author="PanicByte",
author_email="cwq1913@gmail.com", author_email="cwq1913@gmail.com",
description="Image inpainting tool powered by SOTA AI Model", description="Image inpainting tool powered by SOTA AI Model",