dr413677671 / PromptGallery-stable-diffusion-webui

A prompt cookbook worked as stable-diffusion-webui extenstions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while attempting to bind on address ('127.0.0.1', 5173)

Harvester62 opened this issue · comments

At start up I get the error below and the info in the tab Prompt Gallery are not correctly displayed:

INFO: Started server process [8972]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: ::1:53807 - "GET / HTTP/1.1" 200 OK
ERROR: [Errno 10048] error while attempting to bind on address ('127.0.0.1', 5173): di norma è consentito un solo utilizzo di ogni indirizzo di socket (protocollo/indirizzo di rete/porta)
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.

The following is a screenshot of the Prompt Gallery tab content:
immagine

I haven't loaded yet any avatar images, and I don't plan to do it at the moment being only interested to translate the UI in Italian language. Thank you.

I deleted the extension which was installed from the tab Extensions | Available, therefore the name of the directory inside the \extensions folder was left as \extensions\PromptGallery-stable-diffusion-webui, while in your instructions you require to use the manual installation from the Tab Extensions | Install from URL. So, after deleting the above mentioned folder I restarted the Web UI and proceeded with the manual installation as per your instructions, typing also the name of the directory Prompt Gallery as displayed in your README.md file, and restarted the Web UI. This time I didn't get any error messages as previously reported.
Then I followed you instructions selecting in the Prompt Gallery tab the "WhiteHair" button (almost invisible with a dark theme, as you can see), clicked on the first box in the lower left named General_ice_high_res and then on the button "Send WebUI" but nothing happens.

Surely I am not doing it right but there is anyway a problem with the installation, because if the destination directory has to be renamed, then using the option from Extensions | Available --> Install should create the properly named folder, or this is what I would expect. This is just to let you know. Obviously, people shall read the instructions in the README.md file (in your repository). Anyway, I am still unable to view any image despite the two yaml files mentioned in the instructions appear to be correctly populated.

Sorry, I am not used to work with anime characters therefore these procedures might be a little confusing to me, not your fault.
A I wrote before, my interest is mainly to translate into Italian the UI of your extension, not really to work with it, but probably some steps need to be done, which I am not following correctly.
Thank you for your patience.

Hi Harvester,

Thanks for the comments!!

I added a patch today, this should fix most of the issues:

  1. Adapt to the dark theme in webui automatically
  2. Added some instructions on mainpage to help users do configuration. (I will try move this part to the webui QC script)
  3. The API is not working. These seems to be new security stretegies in webui (like cors and image stream). I add a fix accordingly in the extension. “Send to webui” should work now.

Please feel free to reinstalled it and have a try.
image

Thank you @dr413677671 for the patches. I tested your extension again and I still have some issues.

  1. the dark theme doesn't seem to be applied, even if my Firefox browser is set to use the dark theme and therefore SD Web UI uses it, but I will test again forcing the Web UI to use it including the command --theme dark in the Command Line arguments in the webui-user.bat and let you know;
  2. those instructions are useful, thank you, but perhaps the command line argument should read as --cors-allow-origins=http://localhost:5173 instead?
  3. after following the video tutorial instructions and dragging and dropping the two files avatars.yaml and tags.yaml I clicked the button Generate and the images were created (some would definitely need the Highresolution Fix to avoid doubling of the face) but nothing appears in the box named QC Preview and the Error icon appears, while in the Web UI console I see the following errors when I click on Show Pics button:

Traceback (most recent call last):
File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 284, in run_predict
output = await app.blocks.process_api(
File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 983, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 930, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 3313, in postprocess
file = processing_utils.create_tmp_copy_of_file(
File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 341, in create_tmp_copy_of_file
shutil.copy2(file_path, file_obj.name)
File "C:\Program Files\Python310\lib\shutil.py", line 434, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Program Files\Python310\lib\shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
PermissionError: [Errno 13] Permission denied: 'C:\stable-diffusion-webui\extensions\Prompt Gallery\assets\preview\General_ice_high_res\flowing ice portrait focus on face complex extremely'

  1. When I click on Send to Web UI images are being generated and saved in the Downloads folder. Wouldn't be better to save them inside the \assets\preview folder, maybe in \assets\preview\download or something like that? Just asking, I am still trying to learn how to use your extension and script.

Anyway, I was able to check if my Italian localization was correctly applied and it is, but only to the script part of your extension, while the interface in the tab Prompt Gallery stay unchanged and untranslatable. Perhaps the labels and descriptions are not exportable in the language.json file.

Even forcing the Web UI to use a dark theme adding the --theme dark as a command line argument, while all the rest of the UI is using the dark theme, the Prompt Gallery tab content is still being displayed with a white theme.

Sorry forgot to push that patch that night. It should be working now.

@Harvester62 Could this be closed?

I think so, but I'm at the hospital and cannot check if this has been fixed. Yesterday It didn't display that error. Thanks.

I tried this today and was still getting the error.

ERROR: [Errno 99] error while attempting to bind on address ('::1', 5173, 0, 0): cannot assign requested address

  • Followed the readme very specifically (as @Harvester62 mentioned)
  • Running on colab

I dont think it would work if port 5173 is not opened on colab? Colab is notebook environment. You need a server.

Maybe these anwser would help you expose a port in colab, but I am not sure.
https://www.google.com/search?sxsrf=ALiCzsbIiYiAB-khoQkMwUPJgSfcfO6snQ:1671033116194&q=How+do+I+open+a+port+in+Google+Colab%3F&sa=X&ved=2ahUKEwj8trG6u_n7AhUtL0QIHVh6C30Qzmd6BAgaEAU

apparently "Colab will automatically proxy requests to localhost ports" as long as they are local requests.

Also I noticed that my error is slightly different. Notice that it does not mention 127.0.0.1 or localhost.

[Errno 99] error while attempting to bind on address ('::1', 5173, 0, 0): cannot assign requested address

No I am saying port 5173 is not opened on the "SERVER" of colab virtual env.
See it blocked.
捕获