Skip to content

Different Results Between Rest API and DreamStudio #34

@savy-91

Description

@savy-91

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions