replicate.run stopped working
ipmanlk opened this issue · 9 comments
const replicate = new Replicate({
useFileOutput: false,
});
const output = await replicate.run(
"microsoft/bringing-old-photos-back-to-life:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799",
{
input: {
image: inputImageUrl,
},
},
);
console.log(output); // this is undefined nowI started having issues with replicate-javascript since yesterday. Replicate run always seem to return undefined. But I can see predictions being successful in the dashboard. I'm using v1.0.0, and I tried upgrading to v1.0.1 as well.
I also experienced this problem. Sometimes output is undefined or [undefined], albeit successful in dashboard
https://replicate.com/p/1c58j969v1rj40cjr87takk37g
This stayed long in queue and finally got successful, but replicate.js client didn't receive anything.
Getting similar issues, it just seems to be returning a long readableStream.
utput [
FileOutput {
[Symbol(kType)]: 'ReadableStream',
[Symbol(kState)]: <ref *1> {
disturbed: false,
reader: undefined,
state: 'readable',
storedError: undefined,
stream: undefined,
transfer: {
writable: undefined,
port1: undefined,
port2: undefined,
promise: undefined
},...]
Downgrading to @0.31.1 fixed it.
Haven't tried any version in between from 0.31 -> 1.0.1
@AakashKB That's a normal behavior. should read this release note
Hi folks, just want to acknowledge this and thank you for the report. We think we've identified and fixed one major source of these issues, and we've also fixed our own monitoring so that we can see the problems in the first place.
Keep us posted if you keep seeing more of this issues. (The original issue where we're returning undefined or [undefined]).
This was a problem with the API itself sometimes returning a prediction object in an invalid state. That issue should now be fixed. Thanks again for the report!
I'm still seeing ReadableStream being returned for 1.0.1. I've tried 3 different models, all using example input from docs. Downgrading to 0.31 works
@customlogic As I said above, that's a normal behavior. should read this release note
@customlogic As I said above, that's a normal behavior. should read this release note
Thanks, after I wrote the comment I found the documentation on github. I think the problem is that there's a mismatch between this update and the examples on the main Replicate site. As it stands now, ALL node.js examples on the site are broken.