replicate/replicate-python

Align python client's predict method with the JS client

zeke opened this issue · 2 comments

zeke commented

Let's make replicate.predict() a thing.

Kinda like this: https://github.com/replicate/replicate-js

Related to #69

cc @bfirsh and @erbridge as we're talking about this IRL.

zeke commented

What if we introduced support for a shorthand format for referencing a version?

So instead of:

replicate.predict(version="27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478", input={...})

We could do:

replicate.predict(version="stability-ai/stable-diffusion@27b93a", input={...})

This is nicer on the eyes and has the added benefit of making the model name discoverable.

Ben I know you're not keen on using abbreviated SHAs, but maybe in the case where you're scoping it to a specific model your concerns about it go away?

mattt commented

Resolved by #79