Closed HasnainKhanNiazi closed 1 year ago
Hello!
I'm assuming that you were using the SDXL model on DreamStudio, and are also attempting to use SDXL here based on ""engine"": ""stable-diffusion-xl-beta-v2-2-2""
in the POST body.
If that's the case, then instead of specifying the engine in the POST body, you'll want to specify the engine in the RequestUri, like this:
RequestUri = new Uri("https://api.stability.ai/v1/generation/stable-diffusion-xl-beta-v2-2-2/text-to-image")
Hello @johnsabath yes, that was the exact issue. Thanks for pointing out this issue.
Hi @johnsabath thanks for the help before, as I mentioned in my previous comment that the problem is solved by changing the URI and it solved the problem but now, without changing anything, we are getting StatusCode: 400, ReasonPhrase: 'Bad Request', if I change the URI to the "https://api.stability.ai/v1/generation/stable-diffusion-v1-5/text-to-image" then it is working fine but if I change the URI to the "https://api.stability.ai/v1/generation/stable-diffusion-xl-beta-v2-2-2/text-to-image" then I am getting the 400 bad request error.
It was working completely fine and we are having this problem without changing anything.
hey guys, I am using the stable diffusion within C# and I have replicated the curl command within C# and it's working good but I am not satisfied with the generated image,
And the generated image looks like this;
Now, I have also used the DreamStudio UI to generate the image with the same prompt and the parameters and the result looks much better, you can see the result below, what could be wrong in the above code.