-
Notifications
You must be signed in to change notification settings - Fork 28
feat: Add Replicate service for generators #305
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
base: main
Are you sure you want to change the base?
Conversation
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
|
@dylanuys Can you plz check this PR and give me your feedback? Thanks. |
| "openrouter": OpenRouterService, | ||
| "local": LocalService, | ||
| "stabilityai": StabilityAIService | ||
| "replicate": ReplicateService, |
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.
Bug: StabilityAI service accidentally removed from SERVICE_MAP
The StabilityAIService is imported but was accidentally removed from SERVICE_MAP when adding ReplicateService. The diff shows "stabilityai": StabilityAIService was removed from the map while the import on line 8 remains. This breaks the ability to use Stability AI as an image generation service via IMAGE_SERVICE=stabilityai.
dylanuys
left a comment
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.
Do the media returned by these models contain C2PA?
Summary
Adds Replicate API service for image generation, supporting FLUX and SDXL models.
#303
Features
Models Supported
flux-schnellflux-devflux-prosdxlFiles Changed
neurons/generator/services/replicate_service.py- Main service implementationneurons/generator/services/service_registry.py- Registry integrationtests/generator/replicate_service.py- Test suiteUsage
Contribution by Gittensor, learn more at https://gittensor.io/
Note
Introduces a Replicate-backed image generation service supporting FLUX and SDXL, integrates it into the service registry, and adds a focused test suite.
ReplicateService(neurons/generator/services/replicate_service.py) implementing Replicate API image generation.flux-schnell,flux-dev,flux-pro,sdxl(negative prompts only forsdxl)._create_prediction,_poll_prediction), image download, and metadata return (prediction_id,generation_time).replicateinSERVICE_MAPand env options inServiceRegistry(IMAGE_SERVICE/VIDEO_SERVICEincludereplicate).tests/generator/replicate_service.pycovering FLUX/SDXL generation, SDXL negative prompts, invalid model, and invalid API key.Written by Cursor Bugbot for commit 8cde0c2. This will update automatically on new commits. Configure here.