AutoGPT
AutoGPT copied to clipboard
Image generation improvements
Background
AUTOMATIC1111/stable-diffusion-webui exposes an API for generating images using it. This feature can be useful for cutting down costs for generating images and allowing flexibility and more power for tweaking image generation. By using the API exposed by AUTOMATIC1111/stable-diffusion-webui, we can generate images more efficiently and flexibly. This feature allows us to reduce the costs of image generation and to customize the image generation parameters for different models and settings.
Changes
- Added support for using AUTOMATIC1111/stable-diffusion-webui API as an image provider
- Renamed "sd" image provider to "huggingface" to avoid confusion
- Added config options to change HuggingFace text-to-image model, image size, image count and SD WebUI settings
- Modified the
generate_image
function to accept arguments for prompt, negative prompt, num_images, image_size, model and extra params
Documentation
- The code changes are documented using docstrings and comments
Test Plan
- Created a unit test module for image generation to test each image provider
PR Quality Checklist
- [x] My pull request is atomic and focuses on a single change.
- [x] I have thoroughly tested my changes with multiple different prompts.
- [x] I have considered potential risks and mitigations for my changes.
- [x] I have documented my changes clearly and comprehensively.
- [ ] I have not snuck in any "extra" small tweaks changes
I'm not sure whether adding the huggingface image model option breaks the atomicity of this pull request, so if there's any issues with that, please let me know.
@Tymec There are conflicts now
@Tymec CI is red
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.