rupeshs / fastsdcpu

Fast stable diffusion on CPU
MIT License
1.51k stars 123 forks source link

Acsessing web ui from lan #156

Closed Yahavcd closed 5 months ago

Yahavcd commented 8 months ago

I'm trying to find a way to run this on my home server and access it from different computers on my LAN but because it sets up the web ui in loopback it is not possible. I know I can set up reverse proxy to do it but I want to do it without extra applications.

I tried to find were in the code it sets it up but I just couldn't find it.

Is it possible to add support for this to be accessible from LAN?

Thanks

maolei133 commented 8 months ago

sed -i 's|^ webui.launch(share=share)| webui.launch(server_name="0.0.0.0", share=share)|g' /fastsdcpu/src/frontend/webui/ui.py execute the command above

7shi commented 8 months ago

This discussion helped me because I wanted to do the same thing.

By the way, the following appears at the startup.

To create a public link, set share=True in launch().

I tried adding -s to make share=True, so my web UI has been published to the whole world!

Either loopback only or publish externally is extreme, so it would be helpful to support an option to publish locally.

avee87 commented 7 months ago

There is a much simpler solution - you can export GRADIO_SERVER_NAME=0.0.0.0 before starting web UI.