Aedial / novelai-api

Python API for the NovelAI REST API
https://aedial.github.io/novelai-api/
MIT License
132 stars 15 forks source link

Different results with /ai/annotate-image (controlnet mask generation) #15

Open Aedial opened 1 year ago

Aedial commented 1 year ago

There is a slight difference in the /ai/annotate-image compared to the frontend, due to some unknown conversion frontend-side.

Base image: image Base image from frontend: image_input_frontent

Putting the image_input_frontent through the endpoint yields the same result as the frontend.

Aedial commented 1 year ago

From what I found, the difference is only -1/+1 in one of the RGB channels for ~half of the pixels of the top 25% of the image (so ~1/8 of the image). This is done by the frontend before sending the image to the backend to get the mask, but the reasons for such a subtle change are unknown.