--- license: apache-2.0 language: - en pipeline_tag: image-to-image tags: - lama - inpainting - onnx - photocraft library_name: onnx --- # For_my_PhotoCraft Models stored in this repository are used by [PhotoCraft](https://github.com/ussoewwin/photocraft), a native Rust image editor, and PhotoCraft downloads them automatically from here when they are missing on the user's machine. ## Files | File | Size | SHA-256 | Used by | |---|---|---|---| | `big-lama.onnx` | 208,044,816 bytes (198.4 MiB) | `1faef5301d78db7dda502fe59966957ec4b79dd64e16f03ed96913c7a4eb68d6` | PhotoCraft › LaMa Cleaner (`paint.lamaCleaner`) | `big-lama.onnx` is an **unmodified, byte-identical copy** of `lama_fp32.onnx` from [Carve/LaMa-ONNX](https://huggingface.co/Carve/LaMa-ONNX). Identity is proven by the SHA-256 above, which equals the LFS hash of the source file on the upstream repository. The model file itself was not changed in any way. ## The model: big-lama (LaMa inpainting) - Fixed 512×512 input: `image [1,3,512,512]` float in 0..1 (RGB, CHW) and `mask [1,1,512,512]` binary (0 or 1); the output is planar RGB in 0..255. - Opset 17, exported with `torch.onnx.export`, with a custom `FourierUnitJIT` implementation that produces results identical to the original PyTorch model (per the upstream port notes). The input resolution is fixed at 512×512; PhotoCraft reaches arbitrary resolutions with a crop-and-pad strategy around that fixed core. - The inference runs in a helper process through ONNX Runtime with a CUDA → DirectML → CPU execution-provider chain. ## Licenses and attribution Everything in this repository is distributed under the **Apache License 2.0**. A copy of the license text is included in [LICENSE](./LICENSE) (taken verbatim from the original LaMa repository). - **Original model: LaMa** — [advimman/lama](https://github.com/advimman/lama), licensed under Apache-2.0, © 2021 Samsung Research (Samsung AI Center). Paper: Roman Suvorov, Elizaveta Logacheva, Anton Mashikhin, Anastasia Remizova, Arsenii Ashukha, Aleksei Silvestrov, Naejin Kong, Nikita Gontcharovski, Konstantin Sofiiuk, Victor Lempitsky, *"Resolution-robust Large Mask Inpainting with Fourier Convolutions"*, WACV 2023. - **ONNX port: `lama_fp32.onnx`** — [Carve/LaMa-ONNX](https://huggingface.co/Carve/LaMa-ONNX), Apache-2.0. This is the file redistributed here, byte-identical and unmodified. - Redistribution statement (Apache-2.0 §4): the license text is provided in [LICENSE](./LICENSE); the copyright, patent, trademark and attribution notices of the original work are retained in this card; the redistributed file carries no modifications, so no change notices are required. ## Disclaimer This repository and its maintainer are not affiliated with, and not endorsed by, Samsung, Sber, or Carve. The models are redistributed as-is, under their Apache-2.0 licenses, without any warranty.