Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image generation improvements #1477

Merged
merged 6 commits into from
Apr 19, 2023
Merged

Image generation improvements #1477

merged 6 commits into from
Apr 19, 2023

Conversation

Tymec
Copy link
Contributor

@Tymec Tymec commented Apr 15, 2023

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

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@Tymec
Copy link
Contributor Author

Tymec commented Apr 15, 2023

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.

nponeccop
nponeccop previously approved these changes Apr 15, 2023
@nponeccop nponeccop mentioned this pull request Apr 15, 2023
1 task
nponeccop
nponeccop previously approved these changes Apr 16, 2023
@nponeccop
Copy link
Contributor

@Tymec There are conflicts now

@nponeccop
Copy link
Contributor

@Tymec CI is red

@nponeccop nponeccop added the B7 label Apr 16, 2023
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@nponeccop nponeccop mentioned this pull request Apr 17, 2023
1 task
Copy link
Contributor

@nponeccop nponeccop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unrelated changes (not only those few I highlighted)

.gitignore Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it related? If not revert

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly unrelated

@@ -18,13 +21,13 @@ def main() -> None:
parse_arguments()
logger.set_level(logging.DEBUG if cfg.debug_mode else logging.INFO)
ai_name = ""
system_prompt = construct_prompt()
prompt = construct_prompt()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable renaming isn't related to image generation improvements either

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 18, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 18, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 18, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@BillSchumacher BillSchumacher merged commit fdaa55a into Significant-Gravitas:master Apr 19, 2023
@Tymec Tymec deleted the feature/more-image-gen branch April 19, 2023 20:02
sindlinger pushed a commit to Orgsindlinger/Auto-GPT-WebUI that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants