stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Could not create share link, please check your internet connection.

Open ProGamerGov opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

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

What happened?

Gradio cannot connect to the internet in a Google Cloud Compute instance The gradio web link is not created despite using the --share parameter . Previously this worked without issue. Gradio generated the web link perfectly fine if I create a simple script that creates a gradio instance.

Steps to reproduce the problem

  1. Spin up a cloud VM and launch the webui with --share enabled.

What should have happened?

It should work and provide a web link for Gradio.

Commit where the problem happens

a9fed7c364061ae6efb37f797b6b522cb3cf7aa2

What platforms do you use to access the UI ?

Linux

What browsers do you use to access the UI ?

Mozilla Firefox, Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

(base) user@instance-1:~/stable-diffusion-webui$ /home/user/stable-diffusion-webui/venv/bin/python3 webui.py --share --gradio-auth username8008:password --xformers
Loading weights [4711ff4dd2] from /home/user/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-nonema-pruned.ckpt
Creating model from config: /home/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/configs/stable-diffusion/v2-inference-v.yaml
LatentDiffusion: Running in v-prediction mode
DiffusionWrapper has 865.91 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 18.4s (load weights from disk: 12.6s, find config: 1.2s, create model: 0.2s, apply weights to model: 1.2s, apply half(): 0.4s, load VAE: 2.1s, move model to device: 0.7s).
Running on local URL:  http://127.0.0.1:7860

Could not create share link, please check your internet connection.
Startup time: 31.5s (import gradio: 2.7s, import ldm: 1.1s, other imports: 3.9s, setup codeformer: 0.2s, load scripts: 0.4s, load SD checkpoint: 18.4s, create ui: 0.2s, gradio launch: 4.5s).

Additional information

I also made an issue post on the gradio repo: https://github.com/gradio-app/gradio/issues/3498

ProGamerGov avatar Mar 18 '23 00:03 ProGamerGov

It seems to break after the commit 64fc936 when the initial Gradio 3.22 support is implemented in commit 8ea8e71.

You could temporarily circumvent this by going to the repo folder in cmd and typing git checkout 64fc936. On a local install. Which would be like adding !git checkout 64fc936 above !COMMAND_LINE_ARGS.

Solution but with different commit: https://www.reddit.com/r/StableDiffusion/comments/101anxq/comment/j2mdvt6/?utm_source=share&utm_medium=web2x&context=3

It seems to break after gradio is upgraded past version 3.18.0, 3.19.0 breaks the sharing for me.

Ju1-js avatar Mar 26 '23 19:03 Ju1-js

@ProGamerGov Check #9194, are there any antiviruses that might've blocked Gradio's frpc_windows_amd64_v0.2 or frpc_windows_amd64?

Ju1-js avatar Mar 30 '23 17:03 Ju1-js

@Ju1-js The failure was on a Debian Linux cloud server.

ProGamerGov avatar Mar 30 '23 17:03 ProGamerGov

@ProGamerGov I was able to fix this problem by running running sudo su root before running the python command.

From your terminal output, it seems like you're running the command as user and not root

darhsu avatar Apr 18 '23 01:04 darhsu

@ProGamerGov I was able to fix this problem by running running sudo su root before running the python command.

From your terminal output, it seems like you're running the command as user and not root

I have the same issue with a cloud server but your solution did not work for me, i tried running webui.py as root user but got the same test your internet connection error

I also have a question regarding gradio: Do i need username and password for gradio to work?

l0ggik avatar Apr 20 '23 19:04 l0ggik

Do i need username and password for gradio to work?

@l0ggik From my experience, you don't need to the username and password. According to the sd-webui docs for the --gradio-auth parameter is optional and not needed

darhsu avatar Apr 21 '23 02:04 darhsu