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

add more Replicate models #1102

Closed

Conversation

zeke
Copy link
Contributor

@zeke zeke commented Jan 14, 2025

This is a work in progress PR to expand the list of Replicate models.

Every model in this list has over 10,000 runs on Replicate.

To Do

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

awesome ❤️
one thing to take into account is that each HF model page is (automatically or manually) identified as one pipeline type aka. task type, and then the API schema is conditioned by this pipeline type

I haven't looked in depth, but some of the Replicate endpoints might very well not have an API that's conforming to the HF pipeline type. In those cases we should exclude them from the list because the widget won't work.

cc @SBrandeis for more details:)

packages/inference/src/providers/replicate.ts Outdated Show resolved Hide resolved
packages/inference/src/providers/replicate.ts Outdated Show resolved Hide resolved
packages/inference/src/providers/replicate.ts Outdated Show resolved Hide resolved
packages/inference/src/providers/replicate.ts Outdated Show resolved Hide resolved
@SBrandeis SBrandeis self-requested a review January 14, 2025 14:39
@SBrandeis
Copy link
Contributor

Cool stuff @zeke !

Now that #1106 is merged to the main branch, would you mind rebasing this please?

@zeke zeke force-pushed the add-more-mapping-to-replicate-models branch from 676d45d to e676cc7 Compare January 15, 2025 16:25
@zeke
Copy link
Contributor Author

zeke commented Jan 15, 2025

Thanks @SBrandeis. I rebased and added ids to all the versioned models.

For posterity, here's the scrappy bit of code I wrote to grab those versions: https://github.com/zeke/get-replicate-model-versions/blob/c33c995cead6df4ed978930b71e0c8c7c3a5941f/index.js#L62-L81

@zeke zeke marked this pull request as ready for review January 15, 2025 16:30
@zeke zeke changed the title add more Replicate models (WIP) add more Replicate models Jan 15, 2025
@zeke zeke requested a review from julien-c January 15, 2025 17:07
@zeke
Copy link
Contributor Author

zeke commented Jan 23, 2025

The model list in this PR is too amibitious, so I'm gonna close it. Too many modalities to try to support all at once.

Instead we can approach this incrementally. Here's a new PR that adds a handful more models, with tests: #1130

@zeke zeke closed this Jan 23, 2025
SBrandeis added a commit that referenced this pull request Jan 27, 2025
This PR adds mappings for more Replicate models, along with tests for
each new model.

```
vitest run --config vitest.config.mts -t "Replicate"

...

✓ Replicate (9) 8666ms
  ✓ textToImage canonical - black-forest-labs/FLUX.1-schnell 1214ms
  ✓ textToImage canonical - black-forest-labs/FLUX.1-dev 3472ms
  ✓ textToImage canonical - stabilityai/stable-diffusion-3.5-large-turbo 1460ms
  ✓ textToImage versioned - ByteDance/SDXL-Lightning 2612ms
  ✓ textToImage versioned - ByteDance/Hyper-SD 4346ms
  ✓ textToImage versioned - playgroundai/playground-v2.5-1024px-aesthetic 4099ms
  ✓ textToImage versioned - stabilityai/stable-diffusion-xl-base-1.0 7205ms
  ↓ textToSpeech versioned [skipped]
  ↓ textToSpeech OuteTTS [skipped]
```

Replaces #1102

cc @julien-c @SBrandeis

---------

Co-authored-by: SBrandeis <[email protected]>
Co-authored-by: Simon Brandeis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants