Skip to content

Install Guide

John-Henry Lim edited this page Oct 8, 2022 · 21 revisions

This guide is primarily written for Windows users. However, development is done on a (Gentoo) Linux laptop, so Linux users should have a smooth setup.

Installing the webUI/Backend

Follow the corresponding installation guide from AUTOMATIC1111's wiki:

The installation process is almost exactly the same because instead of modifying the codebase, the backend server calls the webUI's internal APIs. If there are any issues, you might want to look at AUTOMATIC1111's wiki first before submitting an issue.

However, I appended .template to webui-user.bat and webui.sh. So first, copy webui-user.bat.template and rename it to webui-user.bat. Afterwards, fill in the values. For example:

:: copy & rename `webui-user.bat.template` to `webui-user.bat`
@echo off

:: i.e. using Python Launcher from https://www.python.org/getit/
set PYTHON=py -3.10
:: below can be left empty for most installations
set GIT=
set VENV_DIR=
:: set CLI args you like, for example:
set COMMANDLINE_ARGS= --medvram --always-batch-cond-uncond --listen

call webui.bat

Afterwards, double click webui-user.bat as per normal to run it & begin the (extremely long; be patient) installation.

Plugin Installation

Download Krita and launch it.

Find the pykrita folder

On the menubar, go to Settings > Manage Resources....

On the popup, click Open Resource Folder. Take note of the pykrita folder located inside (or create it if it doesn't exist).

Install the plugin

The following assumes you cloned/downloaded the repository to C:\Users\john\Documents and did not rename the folder from auto-sd-krita. Adjust accordingly.

The plugin consists of the krita_diff folder and krita_diff.desktop file located in C:\Users\john\Documents\auto-sd-krita\krita_plugin. To install the plugin, copy them into the pykrita folder from earlier.

(Alternative) Symlink install

A symlink is a shortcut to a file or folder that redirects to the real file or folder when read by an application, allowing for automatic updates to the plugin. However, symlinks require admin permissions and are fragile on Windows.

Open an admin prompt and run the following commands, adjusting the file/folder paths based on your own configuration:

cd <location-of-pykrita-folder>
mklink /j krita_diff C:\Users\john\Documents\auto-sd-krita\krita_plugin\krita_diff
mklink krita_diff.desktop C:\Users\john\Documents\auto-sd-krita\krita_plugin\krita_diff.desktop

Enabling the plugin

  1. Restart Krita.
  2. On the menubar, go to Settings > Configure Krita...
  3. On the left sidebar, go to Python Plugin Manager.
  4. Look for Stable Diffusion Plugin and tick the checkbox.
  5. Restart Krita again for changes to take effect.

The SD Plugin docked window should appear on the left of the Krita window. If it does not, look on the menubar under Settings > Dockers for SD Plugin.

Next Steps

You might want to check out the Usage Guide.

Clone this wiki locally