replicate/replicate-python

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

fmattera opened this issue · 0 comments

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.