vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.36k stars 382 forks source link

[Feature]: Offline only mode #1611

Closed zethfoxster closed 1 year ago

zethfoxster commented 1 year ago

Feature description

can we please have the ability to switch to an offline only mode that doesn't try to link to any ports or open any websockets or at the very least have the ability to set the ports in the settings.

Version Platform Description

No response

Aptronymist commented 1 year ago

Feature description

can we please have the ability to switch to an offline only mode that doesn't try to link to any ports or open any websockets or at the very least have the ability to set the ports in the settings.

Version Platform Description

No response

I have no idea what you are talking about, it's entirely offline unless you make it otherwise. Ports are easily set in the command line arguments, most other things are in the settings. Please look around and read the wiki, docs, etc, before posting things like this.

vladmandic commented 1 year ago

I'm going to leave this open until tomorrow so author has a chance to explain, otherwise it will be closed.

zethfoxster commented 1 year ago

no problem, I was unaware that i could set them in the command line, as vlad has been pretty diligent about moving such things into the actual settings. you need to understand that your situation and set up are not MY situation or set up. Off my network I run 6 different game servers with fixed ports in the ranges of 6500-10111...the ports are FIXED they can not be changed. I have 4 computers networked together including the one that im currently using vlads on 3 of which run 4 vm machines in them. to not go into massive details, this computer is the "master" and auto1111 attempts to open a websocket and bind to ports...in most cases has no effect until one of the servers attempts to open the same socket then all hell breaks loose. I know not anyones problem but my own, and my network set up is far more complex than a standard user, I was simply making a suggestion, as im sure im not the only person that never intends to make auto1111 connect through any network including home lan. If its a case of auto needs the port and websocket bind to communicate with the cli, sure no problem...otherwise I dont think the suggest merited a rude responds.

Feature description

can we please have the ability to switch to an offline only mode that doesn't try to link to any ports or open any websockets or at the very least have the ability to set the ports in the settings.

Version Platform Description

No response

I have no idea what you are talking about, it's entirely offline unless you make it otherwise. Ports are easily set in the command line arguments, most other things are in the settings. Please look around and read the wiki, docs, etc, before posting things like this.

vladmandic commented 1 year ago

by default, sdnext only binds to localhost, so its not available on home lan or anywhere else other than localhost. if you want it to be available over lan, you need to set --listen explicitly.

zethfoxster commented 1 year ago

by default, sdnext only binds to localhost, so its not available on home lan or anywhere else other than localhost. if you want it to be available over lan, you need to set --listen explicitly.

yeah this isnt the standard set up, all server bind request are sent to this computer to to process and all traffic routes through it this computer acts as the hub and is the only one that binds websockets. its complicated and I really don't want to go into a shit ton of unrelated details... I'll set the ports in the command line as suggested. keep up the excellent work vlad, love the program!

Aptronymist commented 1 year ago

I know not anyones problem but my own, and my network set up is far more complex than a standard user, I was simply making a suggestion, as im sure im not the only person that never intends to make auto1111 connect through any network including home lan. If its a case of auto needs the port and websocket bind to communicate with the cli, sure no problem...otherwise I dont think the suggest merited a rude responds.

I wasn't trying to be rude, it was just that none of what you were saying at the time made any sense. I'm actively working on improving our documentation, however the answers to what you wanted to know were easily available. The issue was that you were making inaccurate statements about how it worked as though that was reality, when it isn't, that exposed that you had not looked at the existing documentation/wiki/discussions, which you are required to do before posting an issue here.

zethfox commented 1 year ago

I probably didn't explain my unique situation will enough, SDnext does indeed open a websocket and bind on port on localhost. As mine is set up as a hub that handles all udp/tcp for 6 servers, it creates a unique issue that specifically only effect my setup. I'll admit I did not read that I can set the port myself with cmd arg.

vladmandic commented 1 year ago

yes, but what would "offline" mode even look like client being a browser? browser needs to load a page from somewhere and communicate with backend.

zethfox commented 1 year ago

Yeah I realize the need for the port and websocket is to comm with the cli, The web browser can load the webpage without requesting a websocket connection and html5 and java can load python environments ...it really falls back on the current backend needing it.

Nothing can be done as it's just the route auto1111 took with it, and would require a massive recode into java/html5 app and would no longer be able to sync with anything from the original repo... it would no longer be an opinionated fork... I'm sure that's not what you had in mind going into this...

It's really a non-issue as its a single edge case, since I can set the ports with command args...I'm sure at some point that setting too will move into the settings section, most everything else that was cmd args has been so far.

Basically, time would be better spent on anything else really. 😊

vladmandic commented 1 year ago

if you don't like websockets, you can disable them and sdnext will fallback to pure http. --disable-queue

zethfox commented 1 year ago

I'll give that a try thank you! Or maybe I'll just be patient... There's enough cmd arg based purely on network setup that it's bound to eventually have its own section. There is bigger fish to fry, like the up and coming sdlx 1.0 to get ready for...as popular as 0.9 is that deserves any kind of priority over anything related to this post. 😊 Keep up the outstanding work guys!