feat: Add ModelsLabImageGenerationTool for image generation#4557
Open
adhikjoshi wants to merge 1 commit intocrewAIInc:mainfrom
Open
feat: Add ModelsLabImageGenerationTool for image generation#4557adhikjoshi wants to merge 1 commit intocrewAIInc:mainfrom
adhikjoshi wants to merge 1 commit intocrewAIInc:mainfrom
Conversation
Adds ModelsLabImageGenerationTool, a CrewAI tool that generates images using ModelsLab's text-to-image API (https://modelslab.com). ModelsLab provides access to 200+ AI models (Flux, SDXL, Stable Diffusion, community fine-tunes) via a single unified API, similar to DALL-E but provider-agnostic. ## What this adds - lib/crewai-tools/src/crewai_tools/tools/modelslab_tool/modelslab_tool.py - lib/crewai-tools/src/crewai_tools/tools/modelslab_tool/__init__.py - lib/crewai-tools/src/crewai_tools/tools/modelslab_tool/README.md - Updated tools/__init__.py to export ModelsLabImageGenerationTool ## Features - Generates images from text prompts via ModelsLab API - Supports all ModelsLab community models (flux, sdxl, sd3, etc.) - Configurable width/height/steps/guidance/seed/negative_prompt - Automatic async polling for delayed generations (processing status) - Returns JSON with image_url, all_image_urls, model, and prompt ## Usage from crewai_tools import ModelsLabImageGenerationTool image_tool = ModelsLabImageGenerationTool(model='flux', width=1024, height=1024) agent = Agent(tools=[image_tool], ...) ## API Reference https://docs.modelslab.com/image-generation/community-models/text2img
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on February 28. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds ModelsLabImageGenerationTool — a CrewAI tool for generating images using ModelsLab's text-to-image API.
ModelsLab provides access to 200+ AI models (Flux, SDXL, Stable Diffusion, community fine-tunes) via a unified API, complementing the existing
DallETool.What this adds
tools/modelslab_tool/modelslab_tool.pytools/modelslab_tool/__init__.pytools/modelslab_tool/README.mdtools/__init__.pyFeatures
BaseToolpattern asDallEToolprocessingstatus responsesimage_url,all_image_urls,model, andpromptUsage
API Reference
MODELSLAB_API_KEY