Krita Copilot
Krita Copilot is a plugin for Krita that enables you to use DALL·E 2 from within Krita.
Tips
-
Get access by signing up for the DALL·E 2 waitlist.
-
Ensure your usage of DALL·E 2 abides by DALL·E 2's content policy and terms of use.
-
Be mindful about how easy this plugin makes it for you to spend your money / DALL·E 2 credits.
Support
Krita Copilot has been tested on Windows and macOS. Linux may be supported, but this has not been tested.
Installation
Install from URL
If you get an SSL error (likely on macOS), proceed to the "Install from local file" section.
- Open Krita
- Go to "Tools" -> "Scripts" -> "Import Python Plugin from Web"
- Paste the following URL into the text box:
https://github.com/nottheswimmer/krita-copilot/archive/refs/tags/v1.0.2.zip
- Click "OK"
- Click "Yes" when asked if you would like to enable the plugin
- Restart Krita (close and reopen)
Install from local file
-
Download the contents of this repository from GitHub
- Click the green "Code" button in the upper right corner
- Click "Download ZIP"
-
Open Krita
-
Go to "Settings" -> "Manage Resources" -> "Open Resource Folder"
-
Open pykrita
-
Extract the contents of the zip file into the "pykrita" folder
If done correctly, the krita_copilot.desktop file and krita_copilot directory should be in the "pykrita" folder.
-
Restart Krita (close and reopen)
-
Windows: Go to "Settings" -> "Configure Krita"
macOS: Go to "Krita" -> "Preferences"
-
Scroll down on the left until you see "Python Plugin Manager" and click it
-
Check boxes that say "Krita Copilot" - if there's two you can just click both.
-
Click OK.
-
Restart Krita (close and reopen)
A successful installation
If installed correctly, you should see a "docker" in the bottom right called "Krita Copilot." It's possible that you do everything correctly and the plugin is still not working. If you feel that this is the case, please open an issue on GitHub.
Troubleshooting
-
Q: I saw a very big error message, what do I do?
A: Error messages aren't very user-friendly at the moment. Errors can happen due to a few reasons. Here's a list of the common reasons and what to do about them:
- A Krita Copilot bug
- File an issue.
- A network error
- Check your internet connection.
- A DALL·E 2 server error
- Wait for a little bit and try again.
- A credential error
- Check your username and password for OpenAI.
- You don't have enough credits
- Buy more credits or wait for a refresher.
- A DALL·E 2 bug
- Report it to the DALL·E 2 team.
- A Krita Copilot bug
-
Q: Inpainting is just returning the original image, why is that?
A: Your selection needs to contain transparency in order for that area to be inpainted.
-
Q: The image pasted is larger than the region I selected, what gives?
A: DALL·E 2 will only accept and output images that are squares. Currently, the rule used to resolve this is that the maximum of your selection's width/height is used as the side length of the square, and the full output image is pasted into the selected area from the top left corner. A future version could have a setting to allow you to automatically crop the output image to the selection's size.
Technical Notes (for nerds)
- Krita Copilot was developed using PyDalle, a library I created for using the DALL·E 2 API.
- Because Krita has no built-in support for third-party dependencies, the requirements are downloaded from pypi by a script called dependencies.py and added to the PATH before they are imported. Those dependencies are stored in a directory where Krita Copilot also stores settings and downloaded images. The location of this directory varies by OS.
- Because on macOS, Krita may not have valid SSL certificates for the Python environment, the script will fallback to downloading a version of certifi over an insecure connection and verifying the download by calculating the SHA256 hash of the downloaded package. It will then use certificates from certifi to provide SSL context for future downloads.