https://github.com/Acly/krita-ai-diffusion Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} Acly / krita-ai-diffusion Public * Notifications * Fork 28 * Star 1.4k Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required. License GPL-3.0 license 1.4k stars 28 forks Activity Star Notifications * Code * Issues 36 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights Acly/krita-ai-diffusion This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 6 branches 14 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/A] Use Git or checkout with SVN using the web URL. [gh repo clone Acly/k] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @Acly Acly Prioritize python3 over python executable ... 7a84bcd Nov 20, 2023 Prioritize python3 over python executable - python may still refer to python 2 7a84bcd Git stats * 243 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time ai_diffusion Prioritize python3 over python executable November 20, 2023 10:56 doc Add direct link to runpod template in guide #66 November 19, 2023 17:40 media Update readme, add screenshot for pose & upscaling November 1, 2023 15:44 scripts Fix typo in extra_model_paths for docker November 18, 2023 10:59 tests Remove unused import and update server test November 19, 2023 17:36 .gitattributes Keep unix line endings for docker context September 28, 2023 10:35 .gitignore Docker image for runpod.io September 28, 2023 10:35 .gitmodules Readd submodule (2) August 31, 2023 16:13 LICENSE Brief readme and license file September 2, 2023 00:47 README.md Update requirements for custom comfy November 9, 2023 17:22 ai_diffusion.desktop Renamed extension folder August 31, 2023 16:07 pyproject.toml Check for controlnet models when connecting July 1, 2023 14:33 View code [ ] Generative AI for Krita Features Getting Started Requirements Hardware support Installation GPU Cloud Optional: Custom ComfyUI Server Screenshots Technology README.md [logo-128] Generative AI for Krita Features | Download | Installation | Video | Screenshots Generate images from within Krita with minimal fuss: Select an area, push a button, and new content that matches your image will be generated. Or expand your canvas and fill new areas with generated content that blends right in. Text prompts are optional. No tweaking required! This plugin seeks to provide what "Generative Fill/Expand" do in Photoshop - and go beyond. Adjust strength to refine existing content (img2img) or generate images from scratch. Powerful customization is available for advanced users. Local. Open source. Free. Watch video demo Features Features are designed to fit an interactive workflow where AI generation is used as just another tool while painting. They are meant to synergize with traditional tools and the layer stack. * Inpaint: Use Krita's selection tools to mark an area and remove or replace existing content in the image. Simple text prompts can be used to steer generation. * Outpaint: Extend your canvas, select a blank area and automatically fill it with content that seamlessly blends into the existing image. * Generate: Create new images from scratch by decribing them with words or existing images. Supports SD1.5 and SDXL. * Refine: Use the strength slider to refine existing image content instead of replacing it entirely. This also works great for adding new things to an image by painting a (crude) approximation and refining at high strength! * Control: Guide image creation directly with sketches or line art. Use depth or normal maps from existing images or 3D scenes. Transfer character pose from snapshots. Control composition with segmentation maps. * Resolutions: Work efficiently at any resolution. The plugin will automatically use resolutions appropriate for the AI model, and scale them to fit your image region. * Upscaling: Upscale and enrich images to 4k, 8k and beyond without running out of memory. * Job Queue: Depending on hardware, image generation can take some time. The plugin allows you to queue and cancel jobs while working on your image. * History: Not every image will turn out a masterpiece. Preview results and browse previous generations and prompts at any time. * Strong Defaults: Versatile default style presets allow for a simple UI which covers many scenarios. * Customization: Create your own presets - select a Stable Diffusion checkpoint, add LoRA, tweak samplers and more. Getting Started The plugin comes with an integrated installer for the Stable Diffusion backend. Requirements * Windows or Linux (MacOS is untested) * On Linux: Python + venv must be installed (available via package manager, eg. apt install python3-venv) Hardware support To run locally a powerful graphics card with at least 6 GB VRAM is recommended. Otherwise generating images will take very long! NVIDIA GPU supported via CUDA AMD GPU supported via DirectML, Windows only CPU supported, but very slow Cloud GPU supported, rent a GPU on an hourly basis, see below Installation 1. If you haven't yet, go and install Krita! Recommended version: 5.2.1 2. Download the plugin. Unpack the archive into your pykrita folder. + Windows: Usually C:\Users\\AppData\Roaming\krita\ pykrita + Linux: Usually ~/.local/share/krita/pykrita + Check Krita's official documentation if you have trouble locating it. 3. Enable the plugin in Krita (Settings *> Configure Krita *> Python Plugins Manager) and restart. 4. To show the plugin docker: Settings *> Dockers *> AI Image Generation. 5. In the plugin docker, click "Configure" to start server installation. Requires ~10 GB free disk space. GPU Cloud You can also rent a GPU instead of running locally. In that case, step 5 is not needed. Instead use the plugin to connect to a remote server. There is a step by step guide on how to setup cloud GPU on runpod.io or vast.ai. Optional: Custom ComfyUI Server The plugin uses ComfyUI as backend. As an alternative to the automatic installation, you can install it manually or use an existing installation. If the server is already running locally before starting Krita, the plugin will automatically try to connect. Using a remote server is also possible this way. To use an external installation, some extensions and models are required. Screenshots Inpainting on a photo using a realistic model [screenshot] Reworking and adding content to an AI generated image [screenshot] Adding detail and iteratively refining small parts of the image [screenshot] Using ControlNet to guide image generation with a crude scribble [screenshot] Modifying the pose vector layer to control character stances (Click for video) Watch video demo Upscaling to improve image quality and add details [screenshot] Server installation [screenshot] Style preset configuration [screenshot] Technology * Image generation: Stable Diffusion * Diffusion backend: ComfyUI * Inpainting: ControlNet, IP-Adapter About Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required. Topics krita-plugin stable-diffusion generative-ai Resources Readme License GPL-3.0 license Activity Stars 1.4k stars Watchers 14 watching Forks 28 forks Report repository Releases 14 Version 1.7.1 Latest Nov 19, 2023 + 13 releases Contributors 2 * @Acly Acly Niko * @gergelyszaz gergelyszaz Gergely Szaz Languages * Python 98.5% * Other 1.5% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.