Closed leszekhanusz closed 1 year ago
It seems the error is returned about 3 minutes after the request has been made.
Any idea what header I need to allow to fix this?
It seems I'm already allowing that: https://github.com/db0/AI-Horde/blob/main/horde/__init__.py#L33
I've put the header in my reverse proxy as well. Maybe it will work for you now?
No, here is my console.log value:
Access to fetch at 'https://stablehorde.net/api/v2/generate/sync' from origin 'http://localhost:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
It immediately fails every time now.
welp! OK removed it from apache. Did it stop failing immediately now?
Yes, it seems to work again.
But still randomly failing?
Anyway, I suggest you use async instead, as it will allow you to get the status of the request while waiting as well
But still randomly failing?
Difficult to know. It was failing previously when the number of workers were low and after 3 minutes. It seems to work correctly right now. I suspect it fails only when it has to send an error.
Anyway, I suggest you use async instead, as it will allow you to get the status of the request while waiting as well
Yes, I was planning to switch to async once it works correctly in sync mode.
It sounds like it was failing because the request was expiring. It should be better now as I increased the expiry timeout to give more time during high load. Async would avoid the connection ending like that and you would get more info
I'm trying to implement the Stable Horde API for the diffusion-ui frontend.
Using the
https://stablehorde.net/api/v2/generate/sync
endpoint, my POST data looks like this:It seems I was able to receive a few images, but now sometimes I receive the following error: