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

unable to launch react app #1

Open
shreyassks opened this issue Jun 28, 2023 · 6 comments
Open

unable to launch react app #1

shreyassks opened this issue Jun 28, 2023 · 6 comments

Comments

@shreyassks
Copy link

I followed the steps to setup the react app but when i lauch it i get below error.

Screenshot 2023-06-28 at 12 31 01 PM
@shreyassks
Copy link
Author

I also wanted to know which sd model and control net models were chosen to render the text for txt2img and img2img?

@ihsavru
Copy link
Owner

ihsavru commented Jun 29, 2023

Hi, this issue occurs due to CORS error.
You need to enable cors in the A1111 app while running the API.

./webui.sh --api --cors-allow-origins=http://127.0.0.1:3000 --nowebui

Though I believe there's some bug in A1111 and it still doesn't enable CORS, you temporarily add allow origin headers in the API in either webui.py or api.py file

@ihsavru
Copy link
Owner

ihsavru commented Jun 29, 2023

I also wanted to know which sd model and control net models were chosen to render the text for txt2img and img2img?

The images in README.md were created using the Meinamix model and you need to download control_v11p_sd15_lineart controlnet model. (i'll need to add these in the readme)

@shreyassks
Copy link
Author

Hi, this issue occurs due to CORS error. You need to enable cors in the A1111 app while running the API.

./webui.sh --api --cors-allow-origins=http://127.0.0.1:3000 --nowebui

Though I believe there's some bug in A1111 and it still doesn't enable CORS, you temporarily add allow origin headers in the API in either webui.py or api.py file

Hi, I've tried adding allow origin header as well but no luck.
in the backend im getting 400 response
INFO: ::1:49958 - "OPTIONS /sdapi/v1/options HTTP/1.1" 400 Bad Request
INFO: ::1:49959 - "OPTIONS /sdapi/v1/options HTTP/1.1" 400 Bad Request

@ihsavru
Copy link
Owner

ihsavru commented Jun 30, 2023

Hi, this issue occurs due to CORS error. You need to enable cors in the A1111 app while running the API.

./webui.sh --api --cors-allow-origins=http://127.0.0.1:3000 --nowebui

Though I believe there's some bug in A1111 and it still doesn't enable CORS, you temporarily add allow origin headers in the API in either webui.py or api.py file

Hi, I've tried adding allow origin header as well but no luck. in the backend im getting 400 response INFO: ::1:49958 - "OPTIONS /sdapi/v1/options HTTP/1.1" 400 Bad Request INFO: ::1:49959 - "OPTIONS /sdapi/v1/options HTTP/1.1" 400 Bad Request

My bad, I'm passing the command arguments wrong. This should work:

./webui.sh --nowebui --cors-allow-origins http://localhost:3000 --api-log

This will start the API at 7861 port (fetch the latest commits)

@anupam-singh16
Copy link

Hi .

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

3 participants