Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different Results Between Rest API and DreamStudio #34

Open
savy-91 opened this issue Jul 4, 2023 · 0 comments
Open

Different Results Between Rest API and DreamStudio #34

savy-91 opened this issue Jul 4, 2023 · 0 comments

Comments

@savy-91
Copy link

savy-91 commented Jul 4, 2023

Hi!

I am trying to debug why I am getting cropped/ugly images from the REST api whereas with the same prompt and seed I get beautiful images in dreamstudio.

Here is an example:

curl --request POST \
  --url https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v0-9/text-to-image \
  --header 'Accept: image/png' \
  --header 'Authorization: API_KEY' \
  --header 'content-type: application/json' \
  --data '{
  "height": 512,
  "width": 512,
  "seed": 2147483647,
  "steps": 50,
  "cfg_scale": 20,
  "style_preset": "photographic",
  "text_prompts": [
    {
      "text": "A photo of Tina'\''s cozy and inviting bedroom, with warm lighting and a comfortable bed adorned with soft pillows and blankets.",
      "weight": 1
    },
    {
      "text": "blurry, bad anatomy, disfigured, deformed, bad proportions, blurred, cropped",
      "weight": -1
    }
  ]
}'

Leads to the following image:
image

Here are the same inputs, down to cfg_scale, steps and seed:
image

And they lead to this output, consistently:
2147483647_A photo of Tina's cozy and inviting bedroom, with _xl-1024-v0-9

I tried inspecting the gprc payload send by dreamstudio but as I imagined I could only see the "text" parts:

����x��
�Main�ј�
�stable-diffusion-xl-1024-v0-9��"€�
������Ђ?�}A photo of Tina's cozy and inviting bedroom, with warm lighting and a comfortable bed adorned with soft pillows and blankets."W
������@ї�Lblurry, bad anatomy, disfigured, deformed, bad proportions, blurred, cropped"�
������Ђѕ��*%�Ђ��Ђ���яяяя� �(22���:���-�� A��
��Ђ?ъ������Asset�����!
�Asset��

asset-serviceB��������

At least the model, the prompt and the negative prompts looks the same. Am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant