You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Inference] [3rd party] Support versioned and unversioned Replicate models (#1106)
This PR updates the Replicate integration to support running both
versioned and unversioned models via API.
### Versioned models
The vast majority of models on Replicate are
[versioned](https://replicate.com/docs/topics/models/versions). Each
time a model author publishes changes to the model, a new version is
created with a new 64-character SHA identifier. You have to specify a
model's version by ID when running them with the API.
Versioned models use the following HTTP API endpoint:
```
POST /v1/predictions
```
☝🏼 This endpoint expects a `version` in the body of the request.
See https://replicate.com/docs/reference/http#predictions.create
### Unversioned models
Some models on Replicate like
[black-forest-labs/flux-schnell](https://replicate.com/black-forest-labs/flux-schnell)
are _unversioned_. Replicate staff maintains these as evergreen models,
improving their performance and fixing bugs while maintaining API
compatibility, so users know they're always running the latest and
greatest.
Unversioned models have their own HTTP API endpoint:
```
POST /v1/models/{owner}/{model}/predictions
```
See https://replicate.com/docs/reference/http#models.predictions.create
---------
Co-authored-by: SBrandeis <[email protected]>
0 commit comments