{"id":13521983,"url":"https://github.com/axodox/unpaint","last_synced_at":"2025-04-09T16:04:47.709Z","repository":{"id":159174334,"uuid":"618823461","full_name":"axodox/unpaint","owner":"axodox","description":"A simple Windows / Xbox app for generating AI images with Stable Diffusion.","archived":false,"fork":false,"pushed_at":"2024-04-14T19:11:57.000Z","size":27322,"stargazers_count":279,"open_issues_count":15,"forks_count":12,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-09T16:04:38.060Z","etag":null,"topics":["ai","cpp","directml","image-generation","inpaint","native","onnx","onnxruntime","stable-diffusion","uwp","windows","winui"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axodox.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-03-25T13:09:51.000Z","updated_at":"2025-04-03T20:54:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d532170-bd1f-4f67-9d72-ecd6eee1fe0a","html_url":"https://github.com/axodox/unpaint","commit_stats":null,"previous_names":["axodox/native-diffusion"],"tags_count":129,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axodox%2Funpaint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axodox%2Funpaint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axodox%2Funpaint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axodox%2Funpaint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axodox","download_url":"https://codeload.github.com/axodox/unpaint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065290,"owners_count":21041871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cpp","directml","image-generation","inpaint","native","onnx","onnxruntime","stable-diffusion","uwp","windows","winui"],"created_at":"2024-08-01T06:00:40.590Z","updated_at":"2025-04-09T16:04:47.687Z","avatar_url":"https://github.com/axodox.png","language":"C++","readme":"# Introduction\r\n\r\n![an image showing a windowed application where the left side shows a painter's workshop with a canvas selected, while the right side shows the same image, but with the selected canvas replaced with a variation of Mona Lisa](screenshot.png \"The in-painting view in Unpaint\")\r\n\r\n![an image showing a windowed application where the left side shows a depth map of a flying bird, while the right side shows similarly shaped tropical bird](controlnet.png \"Running ControlNet image generation inside Unpaint\")\r\n\r\n\u003e New: [Unpaint demonstration on Xbox consoles](https://github.com/axodox/unpaint/wiki/Running-Unpaint-on-the-Xbox-Series-consoles), see it on [YouTube](https://www.youtube.com/watch?v=CWhoRcQttCM).\r\n\r\nThis repository contains a fully C++ implementation of Stable Diffusion-based image synthesis tool called Unpaint. It supports basic and ControlNet enhanced implementations of txt2img, img2img, inpainting pipelines and the safety checker. This solution does not depend on Python and runs the entire image generation process in a single process, making deployments significantly simpler and smaller, essentially consisting of a few executable and library files (~30MB), and the model weights (~2.5GB / model). Using the library it is possible to integrate Stable Diffusion into almost any application, which can import C++ or C functions.\r\n\r\nFor technical details please check the page of the C++ Stable Diffusion library which Unpaint is based on [here](https://github.com/axodox/axodox-machinelearning).\r\n\r\n# System requirements\r\n\r\nThe application uses DirectML and it supports current GPUs of NVidia and AMD, but should work on other DirectML capable hardware as well. We encourage you to try it with different hardware and [raise issues](https://github.com/axodox/unpaint/issues) on this page if you have problems. Make sure to install the latest Windows updates and especially the latest GPU drivers, as Unpaints benefits from Microsoft's recent Build conference [announced optimizations](https://devblogs.microsoft.com/directx/dml-stable-diffusion/) greatly.\r\n\r\n\u003e Please note that ONNX based pipelines are not yet necessarily as optimized as with using pytorch and CUDA directly, however with latest drivers they are pretty close.\r\n\r\n# How to install the app?\r\n\r\n\u003e [Unpaint is now available in the Microsoft Store](https://www.microsoft.com/store/productId/9N25M770896D), if you do not need the latest dev builds, please install it from there.\r\n\r\nYou can find the app installers on the [releases page](https://github.com/axodox/unpaint/releases). \r\n\r\nTo install the app the *first time* follow these steps:\r\n\r\n- Download both the `.msix` and `.crt` files\r\n- Right click the `.crt` file and select install certificate\r\n- In the wizard select `Local Machine` and click next\r\n- Then select `Place all certificates in following Store` and click `Browse`\r\n- Select `Trusted Root Certification Authorities` and click `OK`\r\n- Click `Next` and then `Finish`\r\n\r\nThis installs Unpaint's self-signed security certificate which is required by the new MSIX installer pipeline for test builds, this is not needed if you install the app from the store.\r\n \r\n**If you feel unsafe consider using [SignTool](https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe) to resign the Unpaint package** with your own certificate (you need to import your own one as well), you can refer to the end of [this](https://github.com/axodox/unpaint/blob/main/build_app.ps1) file on how to do it.\r\n\r\nAfter this just open the `.msix` file and should install fine and start the app.\r\n\r\n# Installing models\r\n\r\nTo use Unpaint you will need to install at least one image generation model. You can install models from your hard drive, or HuggingFace. We have created a handy tutorial on how to convert existing models, you can find it [here](https://github.com/axodox/unpaint/wiki/Model-import).\r\n\r\n# Building the project\r\n\r\nDevelopment environment\r\n\r\n- Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)\r\n  - Select the following workloads:\r\n    - Desktop development with C++\r\n    - Universal Windows Platform development\r\n    - Game development with C++\r\n  - Also select these individual packages:\r\n    - C++ (v143) Universal Windows Platform tools\r\n- Install git from [here](https://git-scm.com/downloads) if you do not have it yet\r\n- I did the project with Windows 11, earlier Windows versions might or might not work\r\n\r\nOnce you have Visual Studio, for the first build follow these steps:\r\n\r\n- Clone the repo with `git clone https://github.com/axodox/unpaint`\r\n- Open `Unpaint.sln` with Visual Studio\r\n  - If Visual Studio prompts you that you still need to install something, then follow its instructions\r\n  - You could also get a prompt to enable `Developer Mode` in Windows, which you can do in the `Settings` app\r\n- Open the `Config` folder in the `Unpaint` project in `Solution Explorer`, and double click `Package.appxmanifest`\r\n- Go to the `Packaging` tab, and select `Choose Certificate`\r\n- Press `Create` and follow the wizard\r\n\r\nAfter this, you can just start the project and have it be built and run. Enjoy :)\r\n","funding_links":[],"categories":["📑 Apps List"],"sub_categories":["💠 Multimedia \u0026 Design"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxodox%2Funpaint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxodox%2Funpaint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxodox%2Funpaint/lists"}