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 (take 2) #1130

Merged
merged 9 commits into from
Jan 27, 2025

Conversation

zeke
Copy link
Contributor

@zeke zeke commented Jan 23, 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

@zeke zeke mentioned this pull request Jan 23, 2025
1 task
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.

neat!

@@ -835,7 +880,7 @@ describe.concurrent("HfInference", () => {
expect(res).toBeInstanceOf(Blob);
});

it("textToSpeech OuteTTS", async () => {
it.skip("textToSpeech OuteTTS", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

this one did not work in your local tests? When https://replicate.com/jbilcke/oute-tts is Warm it was working for us.

Maybe we can replace it with / add https://replicate.com/jaaari/kokoro-82m, it should be Warmer and faster, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it didn't work in my local tests so I skipped it. Looks like the model is cold.

I tried swapping it out with kokoro model but got this error:

   × HfInference > Replicate > textToSpeech hexgrad/Kokoro-82M 363ms
     → "- input: text is required\n"

Copy link
Member

Choose a reason for hiding this comment

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

yep bc the schema i used is different from the one in hexgrad/Kokoro-82M. Given that one is more popular/Warmer, let's switch schemas, WDYT?

@@ -49,6 +49,7 @@
"prepublishOnly": "pnpm run build",
"test": "vitest run --config vitest.config.mts",
"test:browser": "vitest run --browser.name=chrome --browser.headless --config vitest.config.mts",
"test:replicate": "vitest run --config vitest.config.mts -t \"Replicate\"",
Copy link
Member

Choose a reason for hiding this comment

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

let's revert this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. 👍🏼

@SBrandeis
Copy link
Contributor

I updated the VCR tapes

Command used for reference:

VCR_MODE=cache pnpm run test -t 'Replicate'

This command runs the Replicate specific tests, and uses the tapes.json as cache for HTTP calls (storing uncached calls when needed)

@zeke
Copy link
Contributor Author

zeke commented Jan 23, 2025

Thanks for the reviews. This is ready for another look.

@SBrandeis SBrandeis merged commit bd1fa9e into huggingface:main Jan 27, 2025
4 checks passed
@zeke
Copy link
Contributor Author

zeke commented Jan 27, 2025

Yay!

@zeke zeke deleted the add-more-replicate-models branch January 27, 2025 17:10
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