Open-source painting application Krita has entered the generative AI arena with a community‑driven plugin that puts Stable Diffusion directly onto your digital canvas—no cloud services required. The AI Diffusion plugin, developed by Acly, transforms Krita into a full‑fledged AI art studio on Windows 10 and 11, offering inpainting, outpainting, and text‑to‑image generation powered by the ComfyUI backend. This guide walks through every step of the installation and configuration process, from downloading Krita to troubleshooting stubborn ComfyUI connection refused errors.

Why the Krita AI Diffusion Plugin Matters

For digital artists who already rely on Krita for illustration, concept art, and texture painting, the AI Diffusion plugin eliminates the friction of switching to separate Generative AI tools. Instead of exporting a canvas to an external Stable Diffusion interface, artists can now generate, refine, and inpaint images without leaving Krita’s familiar layer system. The plugin supports popular Stable Diffusion models like SD 1.5, SDXL, and community fine‑tunes, and it leverages ComfyUI’s node‑based architecture for flexible workflow control.

Windows users have a particular advantage: the portable versions of both Krita and ComfyUI run smoothly without complex Python environment juggling. By the end of this setup, you’ll be able to type a prompt, select a region, and watch Krita fill it with AI‑generated imagery in seconds.

Prerequisites and System Recommendations

Before installing the plugin, ensure your Windows 10 or 11 machine meets these minimum requirements.

  • A modern NVIDIA GPU with at least 6 GB VRAM (8 GB or more recommended for SDXL). AMD GPUs are supported via DirectML, though performance may vary.
  • GPU drivers updated to the latest version (Game Ready drivers for NVIDIA, Adrenalin for AMD).
  • Python 3.10 or 3.11 (not required if you use the portable ComfyUI build, but useful for troubleshooting).
  • Git (optional, needed only if you plan to clone repositories directly).
  • Disk space: about 10 GB for a typical ComfyUI installation with one or two popular models.

If you’ve never used ComfyUI before, don’t worry—the plugin can either launch its own local ComfyUI server or connect to an existing one. The following steps take the most common path: a fresh local ComfyUI installation paired with Krita.

Step 1: Install the Latest Krita Version

Acly’s plugin requires a relatively recent Krita build that bundles Python support correctly.

  1. Navigate to krita.org/en/download and grab the latest Windows installer (Krita 5.2.2 or newer).
  2. Run the installer and choose a normal installation location (the default C:\\Program Files\\Krita works fine).
  3. After installation, launch Krita once to let it create user folders and configuration files. Close it before proceeding with the plugin.

Krita’s built‑in Python 3.10 interpreter handles plugin execution; however, some older Krita portable builds used Python 3.9. If you encounter missing module errors later, consider a fully‑installed (non‑portable) version or the official installer.

Step 2: Download the AI Diffusion Plugin

The plugin is distributed as a ZIP archive from the GitHub repository.

  1. Open github.com/Acly/krita-ai-diffusion in your browser.
  2. Click the green Code button and select Download ZIP. Alternatively, grab the latest release from the Releases page for a stable version.
  3. Extract the downloaded ZIP to a temporary folder—you’ll only need the krita_ai_diffusion-<version>.zip file that sits inside (do not unzip it further; Krita handles the import).

Step 3: Import the Plugin into Krita

Krita’s Python plugin importer makes the process straightforward.

  1. Launch Krita and go to ToolsScriptsImport Python Plugin from File….
  2. In the file dialog, select the krita_ai_diffusion-<version>.zip you downloaded.
  3. If Krita asks to overwrite older plugin files, confirm. Then restart Krita completely.

After restart, the plugin should appear in the SettingsConfigure KritaPython Plugin Manager list. Ensure the checkbox next to AI Image Diffusion is ticked.

Step 4: Enable the AI Image Generation Docker

The plugin’s interface lives inside a Krita docker—a movable panel that docks to the main window.

  1. Go to SettingsDockers and check AI Image Generation.
  2. A new panel appears, usually at the bottom or side of the Krita window. Drag it to your preferred location if needed.

At this point, the docker will try to connect to a ComfyUI backend. If no backend is running, you’ll see a red status indicator and an error message. That’s expected—we’ll set up ComfyUI next.

Step 5: Set Up the ComfyUI Backend

ComfyUI powers the actual Stable Diffusion inference. The plugin can communicate with a local ComfyUI server over HTTP. You have three main options:

  • Use the integrated portable ComfyUI (recommended for beginners).
  • Install ComfyUI manually and point the plugin to it.
  • Connect to a remote ComfyUI instance (e.g., on a LAN server or cloud GPU).

Option A: Integrated Portable ComfyUI (Easiest)

Recent versions of the AI Diffusion plugin can download and manage a portable ComfyUI installation themselves.

  1. In the AI Image Generation docker, click the gear icon (⚙️) to open plugin settings.
  2. Look for ComfyUIBackend and ensure it’s set to Automatic (download portable ComfyUI).
  3. Click Apply or OK. The plugin will start downloading a self‑contained ComfyUI package (approximately 2 GB).
  4. Once downloaded, a local ComfyUI server starts automatically the next time you launch Krita—no separate command prompt needed.

This method hides the backend entirely; you never see a ComfyUI window. If it fails due to network restrictions or antivirus interference, proceed to Option B.

Option B: Manual ComfyUI Installation

Manual installation gives you direct control over models, custom nodes, and updates.

  1. Download the standalone portable ComfyUI archive from github.com/comfyanonymous/ComfyUI/releases (the ComfyUI_windows_portable_nvidia_cu121 or _cu118 version).
  2. Extract the archive to a folder like C:\\AI\\ComfyUI. The folder should contain run_nvidia_gpu.bat and the ComfyUI subfolder.
  3. Run run_nvidia_gpu.bat once. ComfyUI will start, download some optional dependencies, and print a line like To see the GUI go to: http://127.0.0.1:8188. Keep this console open.
  4. In the AI Image Generation docker settings, set the ComfyUI backend to Custom and enter http://127.0.0.1:8188 as the server address.
  5. Click Connect. The status should turn green.

If you’re using an AMD GPU, download the DirectML version instead and follow its instructions. The plugin’s custom backend setting can also accept a remote IP if ComfyUI runs on another machine.

Option C: Remote ComfyUI

Enter the remote server’s IP and port in the custom backend field. Ensure the firewall on the remote machine allows incoming connections on that port, and that ComfyUI is launched with the --listen flag. A stable LAN connection is recommended; high‑latency connections may cause timeouts.

Step 6: Install Stable Diffusion Models

The plugin cannot generate anything without at least one diffusion model (checkpoint). Model management depends on your backend setup.

Integrated portable ComfyUI: By default, the plugin creates a models folder inside %APPDATA%\\krita-ai-diffusion\\.comfyui\\models. Place checkpoints in checkpoints, LoRAs in loras, VAE in vae, etc.

Manual ComfyUI: Navigate to your ComfyUI installation’s models directory and use the same subfolders.

Popular starter models include:
- Stable Diffusion 1.5 (small, fast, excellent for general art).
- DreamShaper 8 (community fine‑tune with rich fantasy style).
- SDXL base 1.0 + refiner (higher detail, requires more VRAM).

Models can be downloaded from Civitai, HuggingFace Model Hub, or the official Stability AI repositories. Place the .safetensors or .ckpt files directly in the checkpoints folder. After adding a new model, restart Krita (or simply click the Refresh button in the plugin’s model selector) for it to appear.

Step 7: Generate Your First AI Image in Krita

With the backend running and models in place, you’re ready to create.

  1. Open a new Krita canvas (or an existing painting).
  2. In the AI Image Generation docker, type a prompt in the top text field, e.g., “a serene Japanese garden in watercolor style, soft morning light.”
  3. Adjust the Sampling steps (20 is a good start), CFG Scale (7), and Seed (-1 for random).
  4. From the Model dropdown, select the checkpoint you installed.
  5. Choose a Generation Mode:
    - Text to Image creates a completely new full‑canvas image.
    - Inpaint replaces a selected area (use Krita’s selection tools).
    - Outpaint extends the canvas and fills the new area.
    - Reference uses the current layer as a guide (img2img).
  6. Click the purple Generate button. The first generation may take longer as ComfyUI loads the model; subsequent generations are faster.

When finished, the result appears on a new layer, allowing non‑destructive blending with your existing artwork. Hold the Alt key while clicking Generate to place the result above the current layer.

Troubleshooting Common Setbacks

Despite the streamlined installation, a few pain points often arise on Windows. Here’s how to resolve them.

“ComfyUI connection refused” or Red Status Light

Cause: ComfyUI server isn’t running, or the address is incorrect.

  • Manual ComfyUI: Verify that the command console shows http://127.0.0.1:8188 and that the port isn’t blocked by your firewall. Try accessing http://127.0.0.1:8188 in a browser—if ComfyUI’s web UI loads, the issue is in the plugin’s address setting.
  • Integrated portables: Check that the plugin finished downloading. If the progress bar stalled, manually delete %APPDATA%\\krita-ai-diffusion\\.comfyui and let the plugin re‑download.
  • Antivirus interference: Occasionally, Windows Defender or third‑party AV flags the portable ComfyUI as suspicious. Add an exclusion for the .comfyui folder or the ComfyUI executable.

“CUDA out of memory” Errors

Cause: The model is too large for your GPU’s VRAM.

  • Use a smaller model (SD 1.5 instead of SDXL).
  • Reduce the resolution. In the plugin settings, lower Max Resolution to 512×512 for SD 1.5 or 1024×1024 for SDXL.
  • Enable Low VRAM or Tiled VAE in the plugin’s performance settings. These options trade speed for memory.
  • Close other GPU‑intensive applications (browser with many tabs, games, etc.).

Plugin Doesn’t Appear After Import

Cause: Python plugin import failed silently.

  • Ensure you imported the correct ZIP file (the inner zip, not the outer GitHub archive).
  • Restart Krita after importing—no docker will appear until restart.
  • Check ToolsScriptsShow Python Scripts. If the AI Diffusion script is listed but inactive, enable it.
  • Verify that Krita’s Python version is 3.10+. Open HelpShow System Information for Bug Reports and scan for Python version. If it’s 3.9, install a newer Krita build.

Models Don’t Show Up in the Dropdown

Cause: Models placed in the wrong folder or not recognized.

  • Double‑check folder paths. For manual ComfyUI, the path is ComfyUI/models/checkpoints. For integrated portable, it’s %APPDATA%/krita-ai-diffusion/.comfyui/models/checkpoints.
  • Ensure file extensions are .safetensors or .ckpt (capitalization shouldn’t matter, but rename to lowercase for safety).
  • Click the circular Refresh arrow next to the model selector.

Python Module Errors (e.g., “No module named ursina”)

Cause: Missing Python packages.

  • The plugin bundles most dependencies, but if you’re using a custom Krita build or a non‑standard Python environment, try installing Krita’s official installer.
  • You can manually install packages into Krita’s Python using pip from the Krita Python SDK, but this is rarely needed.

Fine‑Tuning Your Workflow

Once the basics are working, explore the plugin’s advanced settings to match your creative process.

  • ControlNet: If you install the corresponding ComfyUI custom nodes and models, you can use ControlNet in the plugin. Place ControlNet models in models/controlnet and the plugin will recognize them for edge detection, depth maps, and more.
  • Prompt Styling: The plugin supports positive and negative prompts, embedding (Textual Inversion) files placed in models/embeddings, and LoRAs applied directly from the UI.
  • Batch generation and upscaling are built‑in; enable them in the docker’s advanced mode (click the gear icon and toggle “Advanced Settings”).
  • Keyboard shortcuts: Map a hotkey to “Generate” via Krita’s SettingsConfigure KritaKeyboard Shortcuts → search for “AI Image Generation” for rapid iteration.

Performance on Windows: What to Expect

On an NVIDIA RTX 3060 (12 GB), SD 1.5 at 512×512 generates an image in roughly 3‑5 seconds; SDXL at 1024×1024 takes about 20‑30 seconds. The integrated ComfyUI adds a slight startup delay when first launched after Krita opens, but subsequent generations are seamless. If you find the UI sluggish while generating, enable hardware acceleration for Krita in SettingsConfigure KritaDisplayCanvas Graphics Acceleration.

AMD GPU users on DirectML should expect slower speeds and limited compatibility with some ControlNet models, but the plugin’s developers are actively improving support.

Keeping Everything Updated

Both Krita and the AI Diffusion plugin evolve rapidly. Updates to the plugin can be installed by repeating Step 3 (importing the latest ZIP). The plugin’s settings, including your ComfyUI path and model folders, are preserved across updates. To update ComfyUI itself, simply replace the ComfyUI folder with a newer portable version (back up your models folder first).

Check the plugin’s GitHub releases page for changelogs and compatibility notes. The author often lists required ComfyUI versions and any breaking changes.

Conclusion

The Krita AI Diffusion plugin bridges the gap between hand‑crafted digital art and generative AI, all on your own Windows machine with no subscription fees. By following the steps above—even the troubleshooting detours—artists can unlock a powerful new set of brushes that think for themselves. Whether you’re inpainting a complicated background, iterating on character designs, or simply experimenting with AI‑assisted color palettes, the combination of Krita’s speed and Stable Diffusion’s creativity makes for a compelling studio upgrade.

Future updates promise deeper ComfyUI integration, expanded model support, and tighter performance optimizations for Windows. For now, the setup demands a little patience, but the reward is a truly local, private, and limitless AI art pipeline right inside your favorite painting app.