replicate-python
replicate-python copied to clipboard
`replicate.run()` does not respect `wait=False`
Client version: 1.0.4
This snippet blocks until the prediction is done:
import replicate
print("starting")
output = replicate.run(
"tencent/hunyuan-video:6c9132aee14409cd6568d030453f1ba50f5f3412b844fe67f78a9eb62d55664f",
input={"prompt": "A cat walks on the grass, realistic style"},
wait=False
)
print(output.__dict__)
print("done")
I'm not really sure what the expected behavior should be here...
The current docs in the README say this:
The timeout can be configured by passing
wait=xtoreplicate.run()wherexis a timeout in seconds between 1 and 60. To disable the sync mode you can passwait=False.
If you're disabling sync mode with replicate.run, where does that leave you? Async mode? What should it return?
cc @hbqdev