This is a plugin for the GNU Image Manipulation Program, GIMP, making it possible to use OpenAI's API endpoint for image editing.
You provide an image in one layer. A region of the layer needs to be fully transparent. Then you execute the plugin and the image gets send to OpenAI's API. The API creates content for the masked pixels and the result is fed back to GIMP as a second layer.
Layer 1: Input Image with fully transparent region |
Layer 2: Generated output |
---|---|
- This is the source image by Nhan Hoang for the example in the first row.
- This is the source image by Pew Nguyen (cropped) for the example in the second row.
- Either take one of the folders found in GIMP:
"Edit" > "Preferences"
then"Folders" > "Plug-Ins"
or add a folder there - Copy the folder
gimp-plugin-dall-e
of this repository to that folder - Make sure
gimp-plugin-dall-e/gimp-plugin-dall-e.py
is executable - Restart GIMP
- Open
./data/sample.xcf
of this project with GIMP - Click
"Filters" > "Dall-E"
- Enter your OpenAI API key
- Enter a prompt
- Click generate (note that the plugin uses a paid endpoint, so you will be charged by OpenAI for usage)
- Currently the plugin only works with a resolution of
512 px * 512 px
. - The plugin only works if you provide a source image in layer 1 with a fully transparent region. This region will be filled with generated content.
- It takes some seconds for OpenAI to generate the output, so GIMP might assume the plugin crashed, just click "wait".