Is there a way I can share my local automatic1111 webui to control it from my phone ?
I was using steamlink but not happy with that too much.
It will be better if I can use it through IP+safari with my iphone.
I know that somehow you can make it public but I dont know how it works.
I edited webui user.bat but it didnt worked for me somehow, maybe i did it wrong.
Thanks for any feedback.
About this post
- Posted
- Archived
- Score
- 19 · 89% up
- Kind
- Text
- ID
- xtkovu
53 comments
Two options - and sorry if I don't explain these in detail, I started doing that and the reply got crazily long - searching on Reddit should give you various tutorials.
The UI library that it's built on has a feature where you can have it create a publicly accessible URL on the gradio server so anyone with an Internet connection anywhere with the URL can access your instance. This is very cool!! But also means you're sending the data via a third party site, and also it's genuinely public, so don't give that URL out publicly otherwise you might get flooded with requests.
Otherwise you can set the UI to listen on either the IP address of the machine you're running it on specifically, or 0.0.0.0 will also work. Then you use your router or the machine itself to find it's IP address on your home network. e.g. 192.168.1.154 etc. Then on your phone you would connect to your home wifi, and then enter that IP address and the port that the web UI is running on.
If you want to do it while out and about you could either use option 2) and then VPN into your home network, or open a port on your router and forward to the machine in question (not recommended unless you know exactly what you're doing).
or.... and I recommend this for 90% of people out there, take advantage of gradio's ability to create the public URL. Then you can be anywhere you have data or wifi on your mobile and get to it.
That option is free, but those URLs will only work for 72 hours, then you need to restart the UI.
The ideal solution is 2) and then use Wireguard to connect into your home network.
wow thank you for your time and help ... will try when home ... big upvote for you ♥
Deleted before we saved it.
I've done the local network setup, and it works great for my partner and I. Helps to have a networking background. Beyond your IP address, you also need to include the port, unless you've set the port to 80 (which may require running the UI as admin?). Also, that setup didn't work when using an all-in -one modem/router when I tried it (sample size = 1).
I just got this working myself, for those who might be having issues, this is what worked:
text edit the
webui-user.batfile. Change this line to be exactly this:set COMMANDLINE_ARGS=--listenSave and close the file.
Then you need to make sure that
port 7860is open. This is one way to open a port easily:Control Panel->System and Security->Windows FirewallAdvanced Settingsand highlightInbound Rulesin the left pane.Inbound Rulesand selectNew Ruleor selectNew RulefromActionson the leftPortand clickNextTCPand enter7860inSpecific local portsand clickNext.(TCP)andport 7860into the next window and click Next.Allow the connectionin the next window and hitNext.Next. I enabled all three.Finish.Launch
webui-user.batas normal. It will now sayRunning on local URL:http://0.0.0.0:7860. For me, this URL does not work, but my machine's IP does. To get your IP, open aCMDshell (typecmdinto your windows search bar) and typeipconfig. You are looking for theIPv4 Address. On the machine that you want to work from, open a browser and typehttp://XXX.XX.X.XX:7860where theXXX.XX.X.XXis the IP of the machine running the webgui service.Now it should work. Note that it will save images on the host machine as you generate them, to save them to the machine you are using to connect to the webgui, you must right-click
save image as.For reasons unknown, the above did not work at first, the webgui came up but no commands worked. I redid the steps and it works fine now, so perhaps I messed something up the first time. Just sharing that detail in case someone has the same experience.
If you want to use a different port, follow all of the above instructions for opening the port but change the
COMMANDLINE_ARGSto:set COMMANDLINE_ARGS=--listen --port XXXXWhere
XXXXis the number of the port you want to use.This worked! Thank you!
thanks for making time for very clear instructions!!
Thanks for the highly detailed post! I made all the steps and still can't access from my phone, I'm curious why the webui.bat file says at the end "To create a public link, set "share=True" in "launch()".
Did I miss something? Help would be very appreciated!
Listen and Share are two different things. The above is for listen, which only works on your local network. Share creates a public link, allegedly, but even the AUTOMATIC1111 docs say that it does not work.
I can't seem to make it work.
When I am using my own ip and the consequent port it works but when I try to access it from another machine it doesn't work.
Is there any extra set-up that I need to do to the other machine in order to work?
thank
UPDATE
for anyone wondering. it works if I input in the browser the ip address of the machine that runs the SD server
hat down for you mate :)
0.0.0.0 usually means its running on all interfaces
Thanks for the solution!
Now it should work. Note that it will save images on the host machine as you generate them, to save them to the machine you are using to connect to the webgui, you must right-click
How would I set-up the output folder on my other machine and not on the host one?
I think you need to use the --listen argument
thank you for reply.
Is there more details about this argument ?
It just allows the program to listen to outside network requests.
That's the right answer
Chrome remote desktop is free and really easy to use IMO
Thank you 5,000%.
Deleted before we saved it.
didnt know about this thanks
Been using this as my solution it would be amazing if I could just open safari and use the web UI directly in my phone
If it’s PC you can use Windows Remote Desktop from your phone.
I figured out what I needed to do and got it working:
This instantly got it working for me. I think this was preventing my PC from communicating with other devices on my network. I hope this helps someone looking for a solution.
This worked for me. Changed to a private network on the machine that's running A1111. Thanks 👍
You edit the webui-user.bat and change a line to "set COMMANDLINE_ARGS=---share" Then you'll get a gradio url link in the command line, which will work for your mobile, though the link expires after 72 hours.
Can I just paste this exact line in the code using notepad? Is there somewhere specific I need to place the line?
The existing line is "COMMANDLINE_ARGS=", so you just add ""- - share" to the end of that, with no spaces.
how do you change it from listening on 127.0.0.1 to the 192.168.1.x address ?
--share gives the gradio link..you have to forward ports to make it available in your mobile device
If your device is on same wifi..you don't need to port forward
It is on the same wifi but when I use the IP in safari it is not working and im not using gradio ...im newbie
I would recommend realvnc. Can use it to control your pc for anything really
thx
I often use automatic1111 webui but on my phone I prefer to use Photoleap. It basically has unlimited generation for free. I wish they would have a web version to use on my Mac.
ok but im using my own trained model from dreambooth :)
I just included it in the webui.bat and I can connect from my phone on the same network entering the PC's IP. Not sure if there is anything more to it.
Personally, when im out of the house I use AnyDesk so my connection is password protected. Although it's a bit annoying to use AnyDesk with a phone screen.
If you plan to access outside of your network (the web) and you're behind a firewall or router it might help to open you port too.
For those, who didn't success:
You need to change webui.bat line 36: %PYTHON% launch.py
to: %PYTHON% launch.py --listen
(backup file first)
from here https://www.reddit.com/r/StableDiffusion/comments/xq3w7k/how_do_i_allow_remote_login_to_automatic1111/
I'm also having the same problem. Can anyone provide a solution?
For anyone still having this issue double check you are using the right ip address. I was trying it with the one I use when transferring things to my phone from my pc, but of course that was my phones ip so it didn't work. A quick ipconfig in cmd on my computer and it works perfect. No need for the firewall rule or changing network type to private. Just --listen and using http://XXX.XX.X.XX:7860 worked for me.