This repository contains a GIMP plugin for integrating with OpenAI's DALL-E service, a powerful AI model that can generate and edit images based on textual descriptions. The plugin offers two main functionalities: creating new images and editing existing ones using DALL-E's capabilities.
- Edit existing images: Select a region in an image and use DALL-E to fill or modify that region based on a given prompt.
- Create new images: Generate entirely new images based on textual prompts, offering various customization options like image size, style, and quality.
- Configurable models: Choose between different DALL-E models for varied results.
- GIMP (version 2.10 or later recommended)
- Active OpenAI API key
- Python 2.7, once this is the only one currently supported by stable GIMP.
To install the DALL-E GIMP Plugin, follow these steps:
- Ensure you have GIMP installed on your system.
- Clone this repository or download the source code.
- Copy the plugin files on plug-ins/ (
dall-e_edit.py
anddall-e_create.py
) to your GIMP plugin directory. Typically, this directory is located at~/.config/GIMP/2.10/plug-ins
on Linux orC:\Users\YourUsername\AppData\Roaming\GIMP\2.10\plug-ins
on Windows. - Restart GIMP to load the new plugin.
Before using the plugin, you need to set your OpenAI API key:
- Go to
DALL-E
in the GIMP menu. - Enter your OpenAI API key when prompted.
- Open an image in GIMP.
- Select a region you wish to edit.
- Navigate to
DALL-E -> Edit
in the GIMP menu. - Enter your desired prompt and adjust settings like model and image size.
- Click
OK
to start the editing process.
- Navigate to
DALL-E -> Create
in the GIMP menu. - Enter your desired prompt and adjust settings like model, image size, style, and quality.
- Click
OK
to generate a new image.
- Large images: Until now (11/2023), DALL-E OpenAI API's does not support images with size > 4mb. So, to allow the user to edit it's image anyway, this plugin tries, incrementally, to reduce the size of the image that's sent to DALL-E (not the one that is being edited), affecting the completion final result quality.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions to the DALL-E GIMP Plugin are welcome. Please feel free to fork the repository, make changes, and submit pull requests.
If you encounter any issues or have suggestions, please open an issue in this GitHub repository.