add support for image-to-image models on Replicate
This PR adds support for the image-to-image task type for Replicate models.
Example:
- https://huggingface.co/stepfun-ai/Step1X-Edit
- https://replicate.com/zsxkib/step1x-edit
cc @hanouticelina
thanks for the PR @zeke, could you please update the task mapping as well?
https://github.com/huggingface/huggingface.js/blob/b57822799149fb9e0c8a0b5ebf6b04ae1a417030/packages/inference/src/lib/getProviderHelper.ts#L134
Done! f449c0f6c9d1b02f2e354df295f15a43492e4b16
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!
Starting over here, since it seems a lot has changed: https://github.com/huggingface/huggingface.js/pull/1564