Skip to content

vegidio/open-photo-ai

Repository files navigation

Open Photo AI (OPAI)

Open Photo AI (OPAI)
Open Photo AI is an open source alternative to the popular photo AI editor.
It currently supports the following enhancements:

🚀 Campaign

We're on Kickstarter! Help us build a sustainable open source alternative to Topaz Photo AI. Back the campaign →

Open Photo AI - Kickstarter

💡 Motivation

There are many excellent AI-based photo editing tools available today, ranging from open-source solutions – often powerful but complex to set up and use, such as ComfyUI – to commercial products that favor ease of use over deep customization, like those from Topaz Labs.

I have long used both ComfyUI and Topaz Labs solutions, choosing between them depending on the task. Recently, however, Topaz Labs moved from a perpetual license to a subscription-based pricing model, a change I strongly dislike. As a developer, I am happy to pay for software that is useful for me, whether open source or proprietary, but I believe subscription models are rarely designed to benefit users and instead primarily serve company interests.

That is why I created this project: an open-source alternative to Topaz Photo AI. It may never match the same level of polish or performance – Topaz has teams of full-time engineers, while this is a solo project built in my spare time – but I have ambitious goals and aim to reach feature parity with their product over time.

🖼️ Usage

There are two ways to use Open Photo AI: using the GUI or the CLI.

The GUI is the easiest way to use the app, with an intuitive interface that allows you to enhance images with just a few clicks. The CLI is more advanced and allows you to enhance images in a more automated way.

Both versions are available for Windows, macOS, and Linux. Download the latest release that matches your computer architecture and operating system and follow the instructions below:

GUI (video 🎥)

Open Photo AI - GUI

  1. Click on the button Browse images to select one or more images that you would like to enhance.
  2. The images are enhanced automatically or manually depending on the toggle Autopilot in the top right side of the screen:
    • If enabled, the app will automatically analyse the images and suggest enhancements for them.
    • If disabled, you will need to select the enhancements yourself, using the button Add enhancement.
  3. Select one or more images that you would like to export on the image drawer at the bottom of the screen.
  4. Click on the button Export image, select the location and image format, then click on Export.

CLI

Coming soon...

✨ Enhancements

All enhancements available here come from open-source AI models that were adapted and converted to work on this project. The models and the credits to the original works can be found in the Hugging Face repository vegidio/open-photo-ai:

Face Recovery

  • Athens: use when identity fidelity matters most. This model lets you preserve facial structure while restoring details, even on heavily degraded faces. Best when you want restoration without changing the person.
  • Santorini: use when you want aggressive, fast enhancement and can tolerate identity drift. It produces sharp, visually pleasing faces on moderate degradation, but may hallucinate features and alter identity on very low-quality inputs.

Verdict: if identity matters, start with Athens; if aesthetics matter more, use Santorini.

Light Adjustment

  • Paris: use when working with images affected by poor or uneven lighting, such as night scenes, backlit photos, shadows, or overexposed areas. It’s useful when you need to enhance visibility and contrast so that images look clearer.

Upscale

  • Tokyo: use when you want a natural upscale without exaggeration. It focuses on preserving the original look and fine structures instead of "inventing" new details, making it ideal when realism and faithfulness matter more than sharpness.
  • Kyoto: use for real-world photos (people, landscapes, products). It excels at restoring details while handling noise, blur, and compression artifacts. Ideal for practical applications where images are imperfect, and you want visually pleasing, robust results fast.
  • Saitama: use for cartoon, drawings, line art, and digital illustrations. It preserves clean lines, flat colors, and stylized shading without introducing photo-like textures. Best when sharp edges and stylistic consistency matter more than realism.

Verdict: start with Tokyo, then try Kyoto if the result looks too soft.

🛣️ Roadmap

These are the features I plan to implement in the future, in no particular order:

  • Model selection and enhancements customization.
  • Support different preview layouts.
  • Add new model for light adjustment.
  • Add app preferences so you don't have to configure them every time.
  • Enable TensorRT acceleration when pre warm-up is implemented.
  • Crop and rotate images in the GUI.
  • Add new models for denoise, sharpening, and color correction.
  • Add new model to colorize black and white photos.
  • Add new model to fix imperfections and remove objects from photos.
  • Simplify the app installation using packages and installers.
  • Attempt to include diffusion-based models (this will be hard!)
  • CLI implementation.
  • Improve documentation for the library.
  • Internationalization to other languages.

💣 Troubleshooting

"App Is Damaged/Blocked..." (Windows & macOS only)

For a couple of years now, Microsoft and Apple have required developers to join their "Developer Program" to gain the pretentious status of an identified developer 😛.

Translating to non-BS language, this means that if you’re not registered with them (i.e., paying the fee), you can’t freely distribute Windows or macOS software. Apps from unidentified developers will display a message saying the app is damaged or blocked and can’t be opened.

To bypass this, open the Terminal and run one of the commands below (depending on your operating system), replacing <path-to-app> with the correct path to where you’ve installed the app:

  • Windows: Unblock-File -Path <path-to-app>
  • macOS: xattr -d com.apple.quarantine <path-to-app>

"Error loading libraries: libwebkit2gtk-4.1.so..." (Linux only)

To run the GUI version of the app on Linux, you will need to install the following dependencies: libgtk and libwebkit2gtk. To do that, open your terminal and run the following command, depending on your distribution:

  • Debian/Ubuntu: sudo apt install libgtk-3-0 libwebkit2gtk-4.1-0
  • Fedora 40+: sudo dnf install gtk3 webkit2gtk4.1
  • Arch Linux: sudo pacman -S gtk3 webkit2gtk-4.1
  • openSUSE: sudo zypper install libgtk-3-0 libwebkit2gtk-4_1-0

The app is taking too long to download dependencies

This app has some important dependencies that can't be bundled with the app itself because they are rather big, like ONNX Runtime, CUDA and TensorRT (if supported by your system). They are hosted on Github and the app will download them the first time it opens.

Unfortunately, Github has a rate limit that will throttle the download speed if these files are downloaded too frequently. Since this is an open-source and free project I can't afford to pay for a hosted solution where we wouldn't have this problem.

If someday this project receives enough funds/donations then I will pay for a better hosting solution. Meanwhile, bare with me on this one.

The model is taking too long to load (TensorRT only)

When you open the app for the first time, if it detects that TensorRT is available on your system, it will prompt you to enable it or not. If you choose to enable it, all models will run with TensorRT acceleration.

This is one of the fastest ways to run the models, however TensorRT needs to optimize the model graphs the first time it's used, which can take a few minutes. This is why it seems to be taking too long or even stuck when you run the models for the first time. But on subsequent runs, when the TensorRT optimization is already done, all enhancements will run much faster.

If you don't want to use TensorRT acceleration, you can disable it in the app Settings.

🐞 Known Issues

  1. Using half-precision (FP16) models with CPU execution provider often doesn't give any performance boost; a bug fix for this is expected to be available in the next ONNX release.
  2. The ONNX Runtime has a bug when running half-precision (FP16) models on Apple's M-series chip; a bug fix for this is expected to be available in the next ONNX release. Meanwhile, all image processing on Macs will be done in full precision, which gives the best quality possible, but it's often unnecessarily slow.
  3. The Tokyo model doesn't work with Apple's CoreML. This is a limitation on CoreML's architecture, so any upscaling using this model on a Mac will be slow.

🛠️ Build

Dependencies

To build this project, you will need the following dependencies installed in your computer:

If you want to build the GUI you will also need:

Compiling

With all the dependencies installed, in the project's root folder run the command:

$ task <interface> arch=<architecture>

Where:

  • <interface>: can be cli or gui.
  • <architecture>: can be amd64 or arm64.

For example, if I wanted to build a GUI version of the app, on architecture AMD64, I would run the command:

$ task gui arch=amd64

📝 License

Open Photo AI is released under the AGPL-3.0 License. See LICENSE for details.

👨🏾‍💻 Author

Vinicius Egidio (vinicius.io)