-
Notifications
You must be signed in to change notification settings - Fork 44.4k
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
base: dev
Are you sure you want to change the base?
feat(blocks): Add AIImageGeneratorBlock
#8525
Conversation
This commit adds the AIImageGeneratorBlock class to the backend. The AIImageGeneratorBlock is responsible for generating images using various AI models through a unified interface.
This PR targets the Automatically setting the base branch to |
✅ Deploy Preview for auto-gpt-docs canceled.
|
autogpt_platform/backend/backend/blocks/ai_image_generator_block.py
Outdated
Show resolved
Hide resolved
ENGRAVING_COLOR = "digital_illustration/engraving_color" | ||
|
||
|
||
class ModelProvider(str, Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class ModelProvider(str, Enum): | |
class ImageGenModel(str, Enum): |
autogpt_platform/backend/backend/blocks/ai_image_generator_block.py
Outdated
Show resolved
Hide resolved
"id": TEST_CREDENTIALS.id, | ||
"type": TEST_CREDENTIALS.type, | ||
"title": TEST_CREDENTIALS.title, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing newline
AIImageGeneratorBlock
…ck.py Co-authored-by: Reinier van der Leer <[email protected]>
…rove error handling
…model and improve code structure
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 |
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.
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. |
Background
This commit adds the
AIImageGeneratorBlock
Block to the platform. TheAIImageGeneratorBlock
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.