Stability-AI / rest-api-support

Stability REST API examples, issues, and discussions | https://api.stability.ai
108 stars 21 forks source link

Every image from stable-diffusion-xl-1024-v1-0 endpoint contains pixel artifacts #44

Closed vince-alcivar closed 8 months ago

vince-alcivar commented 9 months ago

I’m using the Stability API to generate images. Every single image I create has these off-color pixels. The pixels are more noticeable in some images than others depending on the colors, but they are always there. I’ve tried every combination of steps, cfg, sampler, and clip guidance. The pixels aren’t very noticeable at normal resolution but if you zoom in you can see them cleary. The pixels remain even after upscaling, and they are even more noticeable.

Is this supposed to be the “invisible” watermark? Is there some setting to reduce the appearance of these pixels that I’m missing?

I notice other models like DallE3 don’t have these pixels. I also notice images from other older SD models like stable-diffusion-512-v2-1 don’t appear to contain these pixels.

See image for example: 82BC49DA-FF8E-4893-A2CE-695C6DE655D6

vince-alcivar commented 9 months ago

Adding a couple more examples. I want to upscale these images to print them but these pixels look awful even in the upscaled images. Any help would be appreciated.

F89A2D88-A31B-4B1F-886E-D0E9A4297215 DCA46A84-DD96-4E46-9CC2-2024D0D92ACC

vince-alcivar commented 8 months ago

Bumping this. Any guidance would be great.

enzymezoo-code commented 8 months ago

Yes, those pixels are likely caused by the watermark.

Here is a script to detect it: https://github.com/Stability-AI/generative-models/blob/main/scripts/demo/detect.py

The watermark seems to be more visible on parts of images that have flat color and not much texture. Thank you for the valuable feedback. We'll take this into account as we improve the API.

vince-alcivar commented 8 months ago

@enzymezoo-code got it, thanks for taking a look.

I have one more question if you don’t mind. I tried emailing platform@stability.ai a couple times but haven’t gotten a response. I basically want to know if commercial usage of the api is allowed, as in building a website that calls the api in the backend. I see there is a commercial membership plan for self hosted models but no mention of the api.

enzymezoo-code commented 8 months ago

From the FAQ:

How does the Stability AI membership relate to other Stability AI products and services, such as the Stable Image API or Stable Audio? The Stability AI memberships are specifically designed to give our members commercial rights for self-hosting our Core Models in your Virtual Private Cloud (VPC), locally on-premise, or on your edge devices. It does not apply to usage of our cloud-hosted services or products, which are powered by the Core Models but which are run on the cloud infrastructure of Stability AI.

vince-alcivar commented 8 months ago

Thanks for the quick response! Right, my understanding is the memberships do not apply to the api. So my question is, can I use the api for commercial purposes (i.e. to build a website that other people can use to generate images)? Or is it only meant for me, as a single end user?

enzymezoo-code commented 8 months ago

Right, you can use our Stability API commercially without a membership. 👍

vince-alcivar commented 8 months ago

Perfect thank you!