Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bytez Model Provider Integration#1787

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
inf3rnus wants to merge7 commits intohuggingface:main
base:main
Choose a base branch
Loading
frominf3rnus:09-0-25-bytez-integration

Conversation

@inf3rnus
Copy link

@inf3rnusinf3rnus commentedOct 6, 2025
edited
Loading

Hey there all,

We'reBytez, and we're the largest inference provider on the internet! (We offer inference for 170k+ models.)

We're stuck on step 3 of the integration guide presumably because we need to be added as a provider. (We are unable to use the model mapping api because we don't exist as a provider on your backend.)

This PR allows for Bytez to be used as an inference provider (bytez-ai).

For the most part, changes are isolated to just the Bytez code with the exception of 5 places:

  1. packages/inference/src/tasks/audio/audioClassification.ts
  2. packages/inference/src/tasks/cv/imageClassification.ts
  3. packages/inference/src/tasks/cv/objectDetection.ts
  4. packages/inference/src/tasks/cv/imageToText.ts
  5. packages/inference/src/providers/hf-inference.ts

The first three have this simple addition to allow for the flexibility to prepare a payload async, which better aligns with how the other tasks are setup.

constpayload=providerHelper.preparePayloadAsync?awaitproviderHelper.preparePayloadAsync(args):preparePayload(args);

I'd have dug deeper to bring greater consistency for all of the tasks, but opted for these simple adjustments to see what you guys have to say before making any major changes.

The final task change,packages/inference/src/tasks/cv/imageToText.ts follows the same pattern, but also changes the passing of the response to this:

returnproviderHelper.getResponse(res);

It used to be:

returnproviderHelper.getResponse(res[0]);

There isn't a hook higher up in the call stack (AFAIK) for us to adapt our response to look like an array, so I've opted for this.

To ensure that the existinghf-inference provider code still works, I've modified theHFInferenceImageToTextTask to destructure the array internally, which to me seems more consistent with the general pattern, where the raw response is untouched until it is passed to thegetResponse() handler.

exportclassHFInferenceImageToTextTaskextendsHFInferenceTaskimplementsImageToTextTaskHelper{overrideasyncgetResponse(response:ImageToTextOutput[]):Promise<ImageToTextOutput>{const[first]=responseif(typeoffirst?.generated_text!=="string"){thrownewInferenceClientProviderOutputError("Received malformed response from HF-Inference image-to-text API: expected {generated_text: string}");}returnfirst;}}

Please let us know if we need to do anything else! 🙏

Also, as a question, is it normal for us to not be able to hithttps://huggingface.co/api/partners/bytez-ai/models until this PR is accepted and we are on aTeam/Enterprise plan? FWIW we are on aTeam/Enterprise plan.

If so, we'd like to help you update your docs to make this more explicit!

We look forward to integrating!

Long live huggingface! 🤗

@inf3rnusinf3rnus changed the title09 0 25 bytez integrationBytez Model Provider IntegrationOct 6, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@SBrandeisSBrandeisAwaiting requested review from SBrandeisSBrandeis is a code owner

@gary149gary149Awaiting requested review from gary149gary149 is a code owner

@WauplinWauplinAwaiting requested review from WauplinWauplin is a code owner

@julien-cjulien-cAwaiting requested review from julien-cjulien-c is a code owner

@pcuencapcuencaAwaiting requested review from pcuencapcuenca is a code owner

@ngxsonngxsonAwaiting requested review from ngxsonngxson is a code owner

@hanouticelinahanouticelinaAwaiting requested review from hanouticelinahanouticelina is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@inf3rnus

[8]ページ先頭

©2009-2025 Movatter.jp