Sanster / IOPaint

Image inpainting tool powered by SOTA AI Model. Remove any unwanted object, defect, people from your pictures or erase and replace(powered by stable diffusion) any thing on your pictures.
https://www.iopaint.com/
Apache License 2.0
19.13k stars 1.95k forks source link

[Feature Request] Preserving image metadata #299

Open Expletive opened 1 year ago

Expletive commented 1 year ago

I've started using Lama Cleaner recently and I've been very happy with it's results. I primarily use it to touch up AI generated images, and it's very good for removing extra limbs, fingers, background characters, etc.

However, when I save an image, all the metadata saved with the original image, (prompt, model, generation settings...) are wiped from the new image. I'd like it if there was an option to carry over that metadata, as well as perhaps add additional information indicating the image was post-processed with Lama Cleaner.

Sanster commented 1 year ago

I would like to ask you if you set --output-dir when you use Lama Cleaner? I checked the code and found that if --output-dir is set, it does not save exif(metadadta) information, but when start server without --output-dir exif data should be saved.

Expletive commented 1 year ago

I start lama-cleaner with following command. I do not use the --output-dir option. lama-cleaner --model=lama --device=cuda --port=8080 --enable-interactive-seg --interactive-seg-model=vit_l --interactive-seg-device=cuda The "metadata" I am referring to is "tEXt Textual data" test

Steps to reproduce:

maxiser commented 1 year ago

2023-05-03_23-41-48

Sanster commented 1 year ago

2023-05-03_23-41-48

It may be a permission problem https://lama-cleaner-docs.vercel.app/frequently_asked_questions#unrecognized-data-format-error