replicate / replicate-python

Python client for Replicate
https://replicate.com
Apache License 2.0
744 stars 212 forks source link

FOCUS-API: Send back image URLS before the generation is complete #296

Open fmattera opened 5 months ago

fmattera commented 5 months ago

Hi everyone!

I am using the replicate API to generate some images with focus-api model with the replicate.run() method in python.

As I am generating more images at once, the generation time takes a while (>45s). Because of it, most of the times my application sends back a timeout 524.

I was wondering - is there a way for the replicate API to instantly send back the URL where the output images will stored, while the prediction is running?

This would help me massively, as I could just return the URL to my frontend and just pull the images from there, showing them once they are ready.