Skip to main content

Lite Lama - A lightweight LAMA inference wrapper

from litelama import LiteLama
import requests
from PIL import Image
from io import BytesIO


def download_image(url):
    response = requests.get(url)
    return Image.open(BytesIO(response.content)).convert("RGB")


img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"


lama = LiteLama()
lama.to("cuda:0")
init_image = download_image(img_url).resize((512, 512))
mask_image = download_image(mask_url).resize((512, 512))

lama.predict(init_image, mask_image).save("result.png")

Metadata

Release files for litelama 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litelama 0.1.7
File Size Uploaded Provenance Actions
litelama-0.1.7.tar.gz 1.4 MB Without provenance Details for litelama-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for litelama 0.1.7
File Interpreter ABI Platform Actions
litelama-0.1.7-py3-none-any.whl Python 3 none any Details for litelama-0.1.7-py3-none-any.whl

Total release size: 1.4 MB

Release files / litelama-0.1.7.tar.gz

Download URL litelama-0.1.7.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7837f38360acfd14a04ecab8bbb0dbc236514594dd0ffffe63e893a0d6531312
BLAKE2b-256 checksum
How to use checksums
d3d84ebcfba840a00856fdc1c7e157352a1441a3cee3b405ecb7fdc20edfba93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / litelama-0.1.7-py3-none-any.whl

Download URL litelama-0.1.7-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43cdd7859185901694fc11a1b932ca34dd84d404b2d6395a018669327909a776
BLAKE2b-256 checksum
How to use checksums
6e59873f5cbaeae1f2b17e6d1ae6c74e1efde28783db4d7442346a77a6140673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for litelama 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page