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

feat(blocks): Add AIImageGeneratorBlock #8525

Open
wants to merge 26 commits into
base: dev
Choose a base branch
from

Conversation

Torantulino
Copy link
Member

Background

This commit adds the AIImageGeneratorBlock Block to the platform. The AIImageGeneratorBlock is responsible for generating images using various AI models through a unified interface.

The block currently supports:
Flux 1.1 pro, Recraft, Stable Diffusion

Replicate models don't have a unified API, so I've simplified what you're able to customise with this block to keep fields universally applicable to all models. In the future when we have dynamic input fields, certain models can have more advanced options enabled.

This commit adds the AIImageGeneratorBlock class to the backend. The AIImageGeneratorBlock is responsible for generating images using various AI models through a unified interface.
@Torantulino Torantulino requested a review from a team as a code owner November 2, 2024 23:05
@Torantulino Torantulino requested review from Swiftyos and Pwuts and removed request for a team November 2, 2024 23:05
Copy link
Contributor

github-actions bot commented Nov 2, 2024

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot changed the base branch from master to dev November 2, 2024 23:05
Copy link

netlify bot commented Nov 2, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 93de54f
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/673313db04c43600085b59c8

ENGRAVING_COLOR = "digital_illustration/engraving_color"


class ModelProvider(str, Enum):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
class ModelProvider(str, Enum):
class ImageGenModel(str, Enum):

"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
Copy link
Member

Choose a reason for hiding this comment

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

missing newline

@Pwuts Pwuts changed the title feat(block): Add AIImageGeneratorBlock feat(blocks): Add AIImageGeneratorBlock Nov 8, 2024
@Torantulino Torantulino marked this pull request as draft November 11, 2024 16:11
@Torantulino Torantulino marked this pull request as ready for review November 11, 2024 20:41
@Torantulino Torantulino enabled auto-merge (squash) November 11, 2024 20:41
@aarushik93
Copy link
Contributor

Should all of this be grouped under a replicate folder and also remove the existing replicate_flux_advanced.py block as it seems like it's part of this? @Torantulino

@Torantulino
Copy link
Member Author

Torantulino commented Nov 12, 2024

Should all of this be grouped under a replicate folder

Yes good point, this and the music and video blocks should ideally be grouped under a single folder with shared credentials. Might be easier to do this in a separate follow-up PR though when they're all merged.

remove the existing replicate_flux_advanced.py block as it seems like it's part of this? @Torantulino

The problem with removing or editing Blocks right now is that it'll completely break all Agents that are using them. We're going to need to implement some sort of block versioning system going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants