Skip to content

Conversation

zeke
Copy link
Contributor

@zeke zeke commented May 5, 2025

This PR adds support for the image-to-image task type for Replicate models.

Example:

cc @hanouticelina

@zeke zeke marked this pull request as ready for review May 5, 2025 22:27
Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

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

thanks for the PR @zeke, could you please update the task mapping as well?

@zeke
Copy link
Contributor Author

zeke commented May 6, 2025

thanks for the PR @zeke, could you please update the task mapping as well?

Done! f449c0f

hanouticelina added a commit that referenced this pull request May 14, 2025
…nference API (#1439)

This PR is a prerequisite for #1427. 

It refactors the payload construction for `hf-inference` by isolating it
into a separate async function. Note that adding a new async function to
build the payload is necessary because
`HFInferenceImageToImageTask.preparePayload` cannot be made async, yet
the payload construction requires asynchronous operations. A similar
pattern has already been implemented for
[automaticSpeechRecognition](https://github.com/huggingface/huggingface.js/blob/361a0fad4c68943592f0bcbe41592d785eedcb81/packages/inference/src/tasks/audio/automaticSpeechRecognition.ts#L36)
with fal.
@hanouticelina
Copy link
Contributor

Hi @zeke,
#1439 has been merged — could you implement a preparePayloadAsync function in ReplicateImageToImageTask?
You’ll need to make sure that the function returns the payload in the format expected by Replicate. You can take a look at the hf-inference implementation for reference. Let me know if you need any help!

@hanouticelina hanouticelina added the inference-providers integration of a new or existing Inference Provider label May 20, 2025
@zeke
Copy link
Contributor Author

zeke commented Jun 26, 2025

Starting over here, since it seems a lot has changed: #1564

@zeke zeke closed this Jun 26, 2025
SBrandeis added a commit that referenced this pull request Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inference-providers integration of a new or existing Inference Provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants