Problem
With cheap storage and powerful cameras in our pockets, we take quick photos of everything and anything thesedays, and we've all experienced the photobomb (a photograph that has been spoiled by the unexpected appearance of an unintended subject in the camera's field of view as the picture was taken.)
Luckily it's possible to remove these objects from your photos with fully local AI. No need to send your photos to some 3rd party tool.
Solutions
Historically you would need Photoshop + great editing skills to perform this kind of magic.
Now there are many services that can do this for you, but generally they require you to share your personal photos with them. I prefer to keep these photos local.
Apple photo "cleanup"
Apple has a photo cleanup option, but this hasnt really worked well for me. I also prefer having the finegrained control that comes with a desktop application.
Local AI
I'm using Pop_OS for my local development environment.
Install ComfyUI
Follow the installation instructions here: ComfyUI
Install Krita
Download and install from here: Krita
Set up the Krita AI Diffusion plugin
Follow the installation instructions here: Krita-AI-Diffusion Download the default Stable Diffusion models, or the more specialist models.
Next steps:
Now you can get creative with inpainting by changing fashion/redressing models, adding accessories/jewelry, or entirely new objects in the scene.
You can customize your inpainting model, there are models specialising on various types on editing. You can also experiment with tweaking your prompts.
Always keep "NSFW" in your negative prompt, you're running local AI models, so many of the online guardrails are not there, you dont want to accidentally undress your photos!
Need help?
Contact me on Telegram. Let me know if I can expand on the installation and setup steps.
Keywords
#ComfyUI #Krita #ObjectRemoval #AutoSegmentation #Masking #InPaint