replicate-elixir icon indicating copy to clipboard operation
replicate-elixir copied to clipboard

FLUX Pro 1.1 - No version works

Open daniellionel01 opened this issue 1 year ago • 1 comments

Even though you can fetch the model, it does not accept the version that it fetched:

Screenshot 2024-10-09 at 15 07 39

Screenshot 2024-10-09 at 15 13 38

I verified that I can access this model with my API Key and Account via a cURL request, so the problem shouldn't be on my end.

I assume this comes from the fact that it cannot verify the version via the Replicate.Models.get_version!(model, version_string) call:

Screenshot 2024-10-09 at 15 47 30

Here's the code from iex:

m = Replicate.Models.get!("black-forest-labs/flux-1.1-pro")

p = Replicate.Predictions.create("black-forest-labs/flux-1.1-pro:48a1467f83bbf2d13aa60eea3db52fb2ed7020eb543d6b20917981cf6bcdc40e", prompt: "A frog")

I'll be taking a look into the codebase on Friday to see if I can fork it and fix it myself. I'll create a PR if I succeed.

Side note: I don't quite understand, why the version is required for creating predictions. I understand, that you would want the option to specify it, but imo this should be an optional parameter.

daniellionel01 avatar Oct 09 '24 13:10 daniellionel01

After reviewing the code I see that I can just use Prediction.create and Prediction.wait 👍 I still think Prediction.run should accept a version and version-less model though

daniellionel01 avatar Oct 11 '24 17:10 daniellionel01