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

[Bug]: Can't start when I'm offline, only works when I have internet #4648

Closed
1 task done
serhan3535 opened this issue Nov 12, 2022 · 13 comments
Closed
1 task done
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@serhan3535
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

When I'm offline, it's not starting

Steps to reproduce the problem

  1. Click to webui-user.bat
  2. Get error:
    Commit hash:
    Installing requirements for Web UI
    Traceback (most recent call last):
    File "F:\Softwares\stable-diffusion-webui-master\launch.py", line 255, in
    prepare_enviroment()
    File "F:\Softwares\stable-diffusion-webui-master\launch.py", line 213, in prepare_enviroment
    run_pip(f"install -r {requirements_file}", "requirements for Web UI")
    File "F:\Softwares\stable-diffusion-webui-master\launch.py", line 63, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
    File "F:\Softwares\stable-diffusion-webui-master\launch.py", line 34, in run
    raise RuntimeError(message)
    RuntimeError: Couldn't install requirements for Web UI.
    Command: "F:\Softwares\stable-diffusion-webui-master\venv\Scripts\python.exe" -m pip install -r requirements_versions.txt --prefer-binary
    Error code: 1
    stdout:
    stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001AE5E0F5600>: Failed to establish a new connection: [WinError 10013] Eriim izinlerince izin verilmeyen bir ekilde bir yuvaya eriilmeye alld')': /simple/transformers/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001AE5E0F5930>: Failed to establish a new connection: [WinError 10013] Eriim izinlerince izin verilmeyen bir ekilde bir yuvaya eriilmeye alld')': /simple/transformers/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001AE5E0F5C60>: Failed to establish a new connection: [WinError 10013] Eriim izinlerince izin verilmeyen bir ekilde bir yuvaya eriilmeye alld')': /simple/transformers/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001AE5E0F5E10>: Failed to establish a new connection: [WinError 10013] Eriim izinlerince izin verilmeyen bir ekilde bir yuvaya eriilmeye alld')': /simple/transformers/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001AE5E0F5FC0>: Failed to establish a new connection: [WinError 10013] Eriim izinlerince izin verilmeyen bir ekilde bir yuvaya eriilmeye alld')': /simple/transformers/
    ERROR: Could not find a version that satisfies the requirement transformers==4.19.2 (from versions: none)
    ERROR: No matching distribution found for transformers==4.19.2

[notice] A new release of pip available: 22.2.1 -> 22.3.1
[notice] To update, run: F:\Softwares\stable-diffusion-webui-master\venv\Scripts\python.exe -m pip install --upgrade pip

Press any key to continue .

What should have happened?

It should start without internet connection

Commit where the problem happens

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No response

Additional information, context and logs

No response

@serhan3535 serhan3535 added the bug-report Report of a bug, yet to be confirmed label Nov 12, 2022
@serhan3535
Copy link
Author

Update, problem appears after I install dreambooth extension

@bazettfraga
Copy link

Shouldn't you report this to the dreambooth extension rather than the webui then?

@JPW0080
Copy link

JPW0080 commented Nov 13, 2022

Launch webui while online, let the Dreambooth extension install it's requirements.

After successful launch, Go to:
Dreambooth/Create Model

Create models using desired Source Checkpoints...

Close it all down.

Go to:
Path of where webui is installed.

Text Edit/Save:
requirements_versions.txt

Find:
diffusers==0.3.0

Replace with:
diffusers==0.8.0.dev0

Launch webui while offline

Go to:
Dreambooth/Train Model

Select desired Model...

@serhan3535
Copy link
Author

Launch webui while online, let the Dreambooth extension install it's requirements.

After successful launch, Go to:
Dreambooth/Create Model

Create models using desired Source Checkpoints...

Close it all down.

Go to:
Path of where webui is installed.

Text Edit/Save:
requirements_versions.txt

Find:
diffusers==0.3.0

Replace with:
diffusers==0.8.0.dev0

Launch webui while offline

Go to:
Dreambooth/Train Model

Select desired Model...

Thank you

@serhan3535
Copy link
Author

Just tried, it's stil not working without internet

@ClashSAN
Copy link
Collaborator

ClashSAN commented Nov 13, 2022

see here: d8ahazard/sd_dreambooth_extension#140

@JPW0080
Copy link

JPW0080 commented Nov 15, 2022

#NOTE the below will obviously break any new requirements...

Launch webui while online, let the Dreambooth extension install it's requirements.

After successful launch, Go to:
Dreambooth/Create Model

Create models using desired Source Checkpoints...

Close it all down.

Go to:
Path of where webui is installed.

Backup/Text Edit/Save:
requirements.txt
requirements_versions.txt

Select Everything/Delete

requirements.txt and requirements_versions.txt should each have the size of 0kb.

Launch webui while offline

Go to:
Dreambooth/Train Model

Select desired Model...

@mykeehu
Copy link
Contributor

mykeehu commented Nov 20, 2022

We had no internet for two days. I was able to bypass the startup by commenting the launch.py file with the line:
run_pip(f "install -r {requirements_file}", "requirements for Web UI")
Then it started.

So it would be nice to have a --offline command to bypass this line, maybe download all modules from the net in advance, so that it doesn't look for them when there is no net.

@mezotaken
Copy link
Collaborator

dreambooth issue

@mykeehu
Copy link
Contributor

mykeehu commented Jan 31, 2023

No, it's not a dreambooth issue, I got it earlier when I didn't have internet, please open back this issue!

Traceback (most recent call last):
  File "H:\Stable-Diffusion-Automatic\stable-diffusion-webui\launch.py", line 360, in <module>
    prepare_environment()
  File "H:\Stable-Diffusion-Automatic\stable-diffusion-webui\launch.py", line 309, in prepare_environment
    run_pip(f"install -r {requirements_file}", "requirements for Web UI")
  File "H:\Stable-Diffusion-Automatic\stable-diffusion-webui\launch.py", line 137, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
  File "H:\Stable-Diffusion-Automatic\stable-diffusion-webui\launch.py", line 105, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install requirements for Web UI.
Command: "H:\Stable-Diffusion-Automatic\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install -r requirements_versions.txt --prefer-binary
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: blendmodes==2022 in h:\stable-diffusion-automatic\stable-diffusion-webui\venv\lib\site-packages (from -r requirements_versions.txt (line 1)) (2022)
Requirement already satisfied: transformers==4.25.1 in h:\stable-diffusion-automatic\stable-diffusion-webui\venv\lib\site-packages (from -r requirements_versions.txt (line 2)) (4.25.1)

stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A995B40>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/accelerate/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A995090>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/accelerate/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A995270>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/accelerate/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A996560>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/accelerate/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A996710>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/accelerate/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A996B90>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /accelerate/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A996E00>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /accelerate/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A996FB0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /accelerate/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A997160>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /accelerate/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002026A997310>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /accelerate/
ERROR: Could not find a version that satisfies the requirement accelerate==0.12.0 (from versions: none)
ERROR: No matching distribution found for accelerate==0.12.0
WARNING: There was an error checking the latest version of pip.

@mezotaken
Copy link
Collaborator

This exact issue was for DB, yours is not. It could be skipped by adding --skip-install, i don't know if there are any more online dependencies.

@mezotaken mezotaken reopened this Jan 31, 2023
@mykeehu
Copy link
Contributor

mykeehu commented Jan 31, 2023

This would be good, and it seems to be enough to set the condition on this one line and then running.

@boredofnames
Copy link

boredofnames commented May 8, 2023

Maybe I should have made a new issue for this, but this one has a very generic title, and is still open, so here I am.

Trying to launch without active internet (on Linux) causes webui.sh to try and clone the repo again, when it's already cloned. This causes a failure and abort. Same story when using --skip-install.

Launching with internet, the typical "Repo already cloned, using it as install directory" is logged, but without:

################################################################
Clone stable-diffusion-webui
################################################################
Cloning into 'stable-diffusion-webui'...
fatal: unable to access 'https://github.com/AUTOMATIC1111/stable-diffusion-webui.git/': Could not resolve host: github.com
./webui.sh: line 153: cd: stable-diffusion-webui/: No such file or directory
ERROR: Can't cd to /home/user/stable-diffusion-webui/extensions/stable-diffusion-webui/, aborting...         

Edit: My fault, was an issue with modifications made to webui-user.sh. Nevermind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

8 participants