{"id":28187,"library":"simple-lama-inpainting","title":"Simple Lama Inpainting","description":"A lightweight Python wrapper for LaMa image inpainting, supporting CPU and GPU inference. Current version 0.1.2, updated irregularly on PyPI.","status":"active","version":"0.1.2","language":"python","source_language":"en","source_url":"https://github.com/sanazelyari/simple-lama-inpainting","tags":["image-inpainting","lama","deep-learning","pytorch"],"install":[{"cmd":"pip install simple-lama-inpainting","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for model inference","package":"torch","optional":false},{"reason":"Image handling","package":"pillow","optional":false},{"reason":"Array operations","package":"numpy","optional":false},{"reason":"Image processing (common but not strictly required)","package":"opencv-python","optional":true}],"imports":[{"note":"Old or incorrect path; the top-level import is correct since v0.1.0.","wrong":"from simple_lama_inpainting.simple_lama import SimpleLama","symbol":"SimpleLama","correct":"from simple_lama_inpainting import SimpleLama"}],"quickstart":{"code":"from simple_lama_inpainting import SimpleLama\nfrom PIL import Image\n\nsimple_lama = SimpleLama()\nimage = Image.open('input.png')\nmask = Image.open('mask.png')\nresult = simple_lama(image, mask)\nresult.save('output.png')","lang":"python","description":"Basic usage: load image and mask (both PIL), run inpainting, save result."},"warnings":[{"fix":"pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118 (adjust CUDA version as needed)","message":"The package requires PyTorch (>=1.9) but does not install it automatically. You must install torch separately, with the appropriate CUDA version if using GPU.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Ensure mask is converted to binary (0/255) before passing. Use: mask = mask.point(lambda x: 255 if x > 128 else 0)","message":"The mask must be a binary image (black/white) where white indicates the area to inpaint. Using a non-binary mask may produce incorrect results.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Set LAMA_MODEL_PATH=/path/to/big-lama.pt in your environment to use a local model file.","message":"The package downloads the model weights (~250MB) on first run. If your environment has no internet access, pre-download and set environment variable LAMA_MODEL_PATH.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.2':19 'cpu':13 'current':17 'deep':29 'deep-learn':28 'gpu':15 'imag':10,25 'image-inpaint':24 'infer':16 'inpaint':3,11,26 'irregular':21 'lama':2,9,27 'learn':30 'lightweight':5 'pypi':23 'python':6 'pytorch':31 'simpl':1 'support':12 'updat':20 'version':18 'wrapper':7","created_at":"2026-05-09T05:54:11.093061+00:00","updated_at":"2026-05-09T05:54:11.093061+00:00","problems":{"verify_error":"× Failed to build `pillow==9.5.0`\n  ├─▶ The build backend returned an error\n  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit\n      status: 1)\n\n      [stdout]\n      running bdist_wheel\n      running build\n      running build_py\n      creating build/lib.linux-x86_64-cpython-31"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"lama","cli_version":"","type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/simple-lama-inpainting/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"install_fail","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-06","install_tag":null}}