s4afa451dgf415f / colab_stable_diffusion

stable_diffusion_webui的colab部署版本(including English version),下载了所流行插件依赖和并进行初始化配置。拥有mod管理、手机自适应、图片信息本地读取等脚本。
655 stars 78 forks source link

[Error]127.0.0.1:7860鏈接訪問失敗 #50

Closed Cosplayeridol closed 5 months ago

Cosplayeridol commented 5 months ago

Gradio has intermittent problems that prevent it from creating a shared connection. After using ngrok to enter webui, the page prompts that the background service cannot be connected, resulting in many errors in the webui function. What I want to ask is how to solve the problem of 127.0.0.1:7860 access failure? I checked the relevant information. In a certain file of colab, it seems that a code such as share=true needs to be filled in to ensure that 127.0.0.1:7860 can be accessed normally.

▼This is the log of step 4 run /content/stable-diffusion-webui Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] Version: v1.6.0 Commit hash: 5ef669de080814067961f28357256e8fe27544f4 Installing clip Installing open_clip Cloning Stable Diffusion into /content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai... Cloning into '/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai'... remote: Enumerating objects: 580, done. remote: Counting objects: 100% (571/571), done. remote: Compressing objects: 100% (306/306), done. remote: Total 580 (delta 278), reused 446 (delta 247), pack-reused 9 Receiving objects: 100% (580/580), 73.44 MiB | 14.18 MiB/s, done. Resolving deltas: 100% (278/278), done. Cloning Stable Diffusion XL into /content/stable-diffusion-webui/repositories/generative-models... Cloning into '/content/stable-diffusion-webui/repositories/generative-models'... remote: Enumerating objects: 941, done. remote: Total 941 (delta 0), reused 0 (delta 0), pack-reused 941 Receiving objects: 100% (941/941), 43.85 MiB | 11.07 MiB/s, done. Resolving deltas: 100% (490/490), done. Cloning K-diffusion into /content/stable-diffusion-webui/repositories/k-diffusion... Cloning into '/content/stable-diffusion-webui/repositories/k-diffusion'... remote: Enumerating objects: 1340, done. remote: Counting objects: 100% (1340/1340), done. remote: Compressing objects: 100% (433/433), done. remote: Total 1340 (delta 940), reused 1259 (delta 900), pack-reused 0 Receiving objects: 100% (1340/1340), 238.52 KiB | 845.00 KiB/s, done. Resolving deltas: 100% (940/940), done. Cloning CodeFormer into /content/stable-diffusion-webui/repositories/CodeFormer... Cloning into '/content/stable-diffusion-webui/repositories/CodeFormer'... remote: Enumerating objects: 594, done. remote: Counting objects: 100% (283/283), done. remote: Compressing objects: 100% (101/101), done. remote: Total 594 (delta 201), reused 182 (delta 182), pack-reused 311 Receiving objects: 100% (594/594), 17.31 MiB | 10.11 MiB/s, done. Resolving deltas: 100% (288/288), done. Cloning BLIP into /content/stable-diffusion-webui/repositories/BLIP... Cloning into '/content/stable-diffusion-webui/repositories/BLIP'... remote: Enumerating objects: 277, done. remote: Counting objects: 100% (165/165), done. remote: Compressing objects: 100% (30/30), done. remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112 Receiving objects: 100% (277/277), 7.03 MiB | 12.17 MiB/s, done. Resolving deltas: 100% (152/152), done. Installing requirements for CodeFormer Installing requirements Downloading pose_landmark_full.tflite... Downloading pose_web.binarypb... Downloading pose_solution_packed_assets.data... Downloading pose_solution_simd_wasm_bin.wasm... Downloading pose_solution_packed_assets_loader.js... Downloading pose_solution_simd_wasm_bin.js... loading WD14-tagger reqs from /content/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/requirements.txt Checking WD14-tagger requirements. Installing sd-webui-controlnet requirement: fvcore Installing sd-webui-controlnet requirement: mediapipe Installing sd-webui-controlnet requirement: svglib Installing sd-webui-controlnet requirement: changing albumentations version from 1.3.1 to 1.4.3 Installing sd-webui-controlnet requirement: onnxruntime-gpu ControlNet init warning: Unable to install insightface automatically. Please try run pip install insightface manually. Installing sd-webui-controlnet requirement: handrefinerportable Installing sd-webui-controlnet requirement: depth_anything Installing sd-webui-controlnet requirement: dsine Installing sd-webui-prompt-all-in-one: execjs Installing sd-webui-prompt-all-in-one: pathos Installing sd-webui-prompt-all-in-one: openai Installing sd-webui-prompt-all-in-one: boto3 Installing sd-webui-prompt-all-in-one: aliyunsdkcore Installing sd-webui-prompt-all-in-one: aliyunsdkalimt Launching Web UI with arguments: --share --lowram --disable-safe-unpickle --disable-console-progressbars --xformers --enable-insecure-extension-access --opt-sub-quad-attention --no-half-vae --opt-channelslast --api --theme=dark Tag Autocomplete: Creating frequency database Tag Autocomplete: Database successfully created Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu. ControlNet preprocessor location: /content/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads 2024-05-02 06:34:52,679 - ControlNet - INFO - ControlNet v1.1.446 2024-05-02 06:34:53,113 - ControlNet - INFO - ControlNet v1.1.446 ui config file not found, using default values sd-webui-prompt-all-in-one background API service started successfully. == WD14 tagger /gpu:0, uname_result(system='Linux', node='a90718bd1d73', release='6.1.58+', version='#1 SMP PREEMPT_DYNAMIC Sat Nov 18 15:31:17 UTC 2023', machine='x86_64') == Checkpoint not found; loading fallback AbyssOrangeMix2.safetensors Calculating sha256 for /content/stable-diffusion-webui/models/Stable-diffusion/AbyssOrangeMix2.safetensors: 2024-05-02 06:34:54,583 - ControlNet - INFO - ControlNet UI callback registered. Running on local URL: http://127.0.0.1:7860/

Could not create share link. Missing file: /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2.

Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps:

  1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
  2. Rename the downloaded file to: frpc_linux_amd64_v0.2
  3. Move the file to this location: /usr/local/lib/python3.10/dist-packages/gradio Startup time: 267.5s (prepare environment: 243.7s, import torch: 5.2s, import gradio: 1.9s, setup paths: 8.8s, initialize shared: 0.4s, other imports: 1.2s, setup codeformer: 0.2s, list SD models: 0.1s, load scripts: 3.2s, create ui: 1.3s, gradio launch: 1.2s, add APIs: 0.1s). e714ee20aa8d8b0f0ff8f04d1a6c9137b12d475dc0c22e08ee373e77c8714a91 Loading weights [e714ee20aa] from /content/stable-diffusion-webui/models/Stable-diffusion/AbyssOrangeMix2.safetensors Creating model from config: /content/stable-diffusion-webui/configs/v1-inference.yaml vocab.json: 100% 961k/961k [00:00<00:00, 63.2MB/s] merges.txt: 100% 525k/525k [00:00<00:00, 41.6MB/s] special_tokens_map.json: 100% 389/389 [00:00<00:00, 1.78MB/s] tokenizer_config.json: 100% 905/905 [00:00<00:00, 3.65MB/s] config.json: 100% 4.52k/4.52k [00:00<00:00, 15.6MB/s] Applying attention optimization: xformers... done. Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad-artist.pt: 2d356134903e8f47bf6cf519bdf577cdcee42fc717ef264498162e94f130843a Calculating sha256 for /content/stable-diffusion-webui/embeddings/ulzzang-6500-v1.1.bin: 8c1af299c7e8c2283892a7ad61a5fe5574e88c9c2ee77cd0cdfc0615155fa315 Calculating sha256 for /content/stable-diffusion-webui/embeddings/CyberRealistic_Negative-neg.pt: 65f3ea567c04c22f92024c5b55cbeca580bc330c4290aeb647ebd86273b3ffb8 Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad-hands-5.pt: aa7651be154c46a2f4868788ef84a92b3083b0c0c5c46f5012a56698bfd2a1ba Calculating sha256 for /content/stable-diffusion-webui/embeddings/badhandv4.pt: 5e40d722fc3d0c2decb62debfaf8058db30ccdae9ab00ff64b183907b435708e Calculating sha256 for /content/stable-diffusion-webui/embeddings/charturnerv2.pt: a91b570185766ff71f242f83d5beb6d658348900edb706a2092ba23d6e1e2cf8 Calculating sha256 for /content/stable-diffusion-webui/embeddings/Asian-Less-Neg.pt: 22d2f003e76f94dcf891b821a3f447f25c73b2e0542f089427b33ff344070a96 Calculating sha256 for /content/stable-diffusion-webui/embeddings/negative_hand-neg.pt: 73b524a2da121eb1b7ad04dea11da286277813120700ff8f1d8522516f7b30ab Calculating sha256 for /content/stable-diffusion-webui/embeddings/EasyNegativeV2.safetensors: 339cc9210f70ef842b716588373d95b52351d7e6d111b858e133e3b1e3bd8088 Calculating sha256 for /content/stable-diffusion-webui/embeddings/verybadimagenegative_v1.3.pt: d70463f87042e2b5951c303542f3e171cf49af9b7df53b2f20779493786eb143 Calculating sha256 for /content/stable-diffusion-webui/embeddings/nfixer.pt: aa5a14f467a8cb8660e92e97ca647ab90ef3aa00dc6da842ab735170347f78c7 Calculating sha256 for /content/stable-diffusion-webui/embeddings/easynegative.safetensors: c74b4e810b030f6b75fde959e2db678c268d07115b85356d3c0138ba5eb42340 Calculating sha256 for /content/stable-diffusion-webui/embeddings/ng_deepnegative_v1_75t.pt: 54e7e4826d53949a3d0dde40aea023b1e456a618c608a7630e3999fd38f93245 Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad_pictures.pt: 522ac70ba997df4a911e4977e6a9790e7d15236596e8e0c8318330f2af4ab095 Calculating sha256 for /content/stable-diffusion-webui/embeddings/ulzzang-6500.pt: 66d481a222ee4638e254a411890f2a8716e4ce5c3e1b1957891c7628bbdeac78 Calculating sha256 for /content/stable-diffusion-webui/embeddings/HyperStylizeV6.pt: a09539451c9161038c9ac0a322ad8ffafffb097a70874b65e31eb06f0bb2e412 Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad_prompt.pt: f9dfe1c982e2a1917054fa827ee1f981c6e6102984f981c691e4f8c817e292cb Calculating sha256 for /content/stable-diffusion-webui/embeddings/nrealfixer.pt: d1193a5ecddb3b5b052f5efb1a74062dcd130a4060884eed439a605b9731c0ad Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad-picture-chill-75v.pt: 7d9cc5f549d7972f24803a3a9880a923fb9a1b68c1443da3ce1ff2f7eff25ae9 Calculating sha256 for /content/stable-diffusion-webui/embeddings/rmadanegative402_sd15-neg.pt: ad488e18aa29f12e8fc18d1d2ccc041ff0052d4657c96f1b06cab880f4ba4f40 Calculating sha256 for /content/stable-diffusion-webui/embeddings/pureerosface_v1.pt: dedb4322e42e360fe01775ba817be03ac6a6c307744562bb0d6759368bc681da Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad-artist-anime.pt: 5f7bea88750c97a0b8c9ba9f5bc0d13648c3a17a69aaac855903229d5f58c34b Calculating sha256 for /content/stable-diffusion-webui/embeddings/nartfixer.pt: a0504f05844290ac4d2de41d0338fb642548fb18efd8c6de7bb571ab1d60af89 Calculating sha256 for /content/stable-diffusion-webui/embeddings/21charturnerv2.pt: f253abb016c22dd426d6e482f4f8c3960766de6e4c02f151478bfb98f6985383 Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad-image-v2-39000.pt: 5b9281d7c6adc221b8ea9067b678f4b6ff4cc94735e2d50885070380d5496037 Calculating sha256 for /content/stable-diffusion-webui/embeddings/bad_prompt_version2.pt: 6f35e7dd816ae04bb3f774a9a17ebfbc50c0e3a53f69a9a40bed05936d3a3812 Model loaded in 64.4s (calculate hash: 35.5s, load weights from disk: 23.8s, create model: 3.4s, apply weights to model: 0.4s, load textual inversion embeddings: 0.5s, calculate empty prompt: 0.6s).
s4afa451dgf415f commented 5 months ago

gradio-app/gradio#8186

Gradio is working on fixing this issue. Currently, using ngrok tunnels and older versions of SD seems to solve the problem, or you can wait for share link infrastructure fixed

Cosplayeridol commented 5 months ago

gradio-app/gradio#8186

Gradio is working on fixing this issue. Currently, using ngrok tunnels and older versions of SD seems to solve the problem, or you can wait for share link infrastructure fixed

When gradio is down, using ngrok to access webui will cause an error that the background service cannot be accessed. I accessed the SD1.5 project through another commonly used old cloab project. An error occurred in gradio and the project could not start normally. It seems that the impact of gradio down is greater than imagined.

However, how to solve the problem that the 127.0.0.1:7860 link address cannot be accessed. This address cannot be accessed normally when the project is running normally on weekdays. Because this is a project running on colab, I can rule it out locally. The scope of the error is very limited. If it is an SD project deployed locally, it seems to be a problem with the files in C:\Windows\System32\drivers\etc\hosts under normal circumstances.🧐

s4afa451dgf415f commented 5 months ago

I tested it based on version 1.6 of SD. Both links can be opened and generate normally. I need screenshots of any relevant errors from you Screenshot_20240502_221510_com oray sunlogin

Cosplayeridol commented 5 months ago

image The code for step 4 is pasted in the issue.I'm not sure if I'm the only one having this problem.(https://github.com/s4afa451dgf415f/colab_stable_diffusion/issues/50#issue-2274745465)

s4afa451dgf415f commented 5 months ago

127.0.0.1 is your localhost and can't be opened. You need to open links of the type gradio.live (version 1.6.0 can generate) or ngrok-free.app (get Authtoken from ngrok.com and fill in ngrok input).

Cosplayeridol commented 5 months ago

127.0.0.1 is your localhost and can't be opened. You need to open links of the type gradio.live (version 1.6.0 can generate) or ngrok-free.app (get Authtoken from ngrok.com and fill in ngrok input).

I understand. I originally thought that the link at 127.0.0.1:7860 was accessible. Because I see it generates two links for me to choose from. image

miaowm5 commented 5 months ago

As a ngrok alternative you can use cloudflare. Just put and run this code before Step4:

!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
!dpkg -i cloudflared-linux-amd64.deb
!cloudflared tunnel --url http://localhost:7860

for more info: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/