Leonardo-Interactive/leonardo-ts-sdk

Bug: guidande_scale not being considered when used

ejkkan opened this issue · 11 comments

ejkkan commented

guidance_scale is supported by the API.
Using guidance_scale as a param makes the generated images always default to 7(as per the API spec).

The SDK asks for guidanceScale but the API throws errors when using this parameter.

Thanks following up on whether this is in the API or the spec

ejkkan commented

@simplesagar Just wanted to ask if you meant for me to answer this.
If so, it seems like the SDK opts for a camelCase interface so it should then handle translating guidanceScale to guidance_scale for the API. 😅

Oh Sorry @ejkkan not at all, this was a comment. We are following up on this !

@ejkkan Thanks for surfacing this, looking in to it and trying to reproduce now

Hi @ejkkan, we'll try to reproduce this.

Can you share the specific error message you're seeing, and optionally a snippet of your usage of the SDK?

ejkkan commented

@anuraagnalluri
I've created this example for most of the issues I've reported. See here
So please config it to make the setup relevant for each issue.
Notice that I'm using v1.28 specifically because of functionality being broken as mentioned in

ejkkan commented

@anuraagnalluri Now going on a week since I last heard anything.

Hi Erik, Could you please try SDK version 1.44.1. It should address this issue: https://github.com/Leonardo-Interactive/leonardo-ts-sdk/releases/tag/v1.44.1

ejkkan commented

Still broken in 1.44.1.
If you update the SDK in the example repo I provided you should see the faulty behavior.

Hi @ejkkan , I used the script you provided and did a fresh install of 1.44.1 and it worked as expected. One possible explanation is that the dependencies may not actually be updated, in which case deleting node_modules and doing a fresh install may resolve the issue.

Note that I had to fix the script to call GenerateImages instead of the inline script and I had to change the request fields to camelCase.

ejkkan commented

@alexadrake You're correct. I messed up with the testing there. My bad, thanks for fixing it!