lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
41.51k stars 5.9k forks source link

[Bug]: Unable to generate Gradio public url #2817

Closed raahulgupta07 closed 6 months ago

raahulgupta07 commented 6 months ago

Checklist

What happened?

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

Screenshot 2024-04-27 at 1 26 50 PM Screenshot 2024-04-27 at 1 26 50 PM

Steps to reproduce the problem

when i in run the below command i am getting the attached error in google colab till yesterday everything was working fine i am facing this issue since today

!python entry_with_update.py --share --always-high-vram

What should have happened?

--

What browsers do you use to access Fooocus?

No response

Where are you running Fooocus?

None

What operating system are you using?

No response

Console logs

--

Additional information

--

DeepakNIEMysuru commented 6 months ago

After adding the downloaded file to the location mentioned below

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 Running on https://localhost:7865/

Due to antivirus the system won't download the file. When I downloaded the file in other system, It got downloaded and after adding it to path, Still the error persists..

poor7 commented 6 months ago

Today the Gradio Share API crashes periodically. Because of this, an error is displayed and the link is not created. https://status.gradio.app/793595965

DeepakNIEMysuru commented 6 months ago

Hi Lllyasviel/Fooocus,

Thanks for the update & Gradio spelling is wrong in the bug name, modify it.

Thanks & Regards, Deepak P, Assistant Professor, Department of Computer Science and Engineering The National Institute of Engineering, Mysuru Mobile No. : +91 7353641871

On Sat, Apr 27, 2024 at 1:52 PM poor7 @.***> wrote:

Today the Gradio Share API crashes periodically. Because of this, an error is displayed and the link is not created. https://status.gradio.app/793595965

— Reply to this email directly, view it on GitHub https://github.com/lllyasviel/Fooocus/issues/2817#issuecomment-2080414190, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3CELIYSDMJAL3MAFM5XDCLY7NN53AVCNFSM6AAAAABG33NQ5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBQGQYTIMJZGA . You are receiving this because you commented.Message ID: @.***>

dmitryalexander commented 6 months ago

same issue..

Here's how you solve the problem.

Go to the google colab..

add these two lines at the top.

!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb !dpkg -i cloudflared-linux-amd64.deb

Screenshot 2024-04-27 080319

like this...

then it will clone the repo... Next, find the file in your google colab called webui.py Screenshot 2024-04-27 080547

at the very bottom of the webui.py file.... find the line that says: shared.gradio_root.launch(

and paste this code right BEFORE it.

import subprocess import threading import time import socket

def iframe_thread(port): while True: time.sleep(0.5) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = sock.connect_ex(('127.0.0.1', port)) if result == 0: break sock.close() print("\nFooocus finished loading, trying to launch cloudflared (if it gets stuck here cloudflared is having issues)\n") p = subprocess.Popen(["cloudflared", "tunnel", "--url", "http://127.0.0.1:{}".format(port)], stdout=subprocess.PIPE, stderr=subprocess.PIPE) for line in p.stderr: l = line.decode() if "trycloudflare.com" in l: print("This is the URL to access Fooocus:", l[l.find("https"):], end='')

port = 7865 # Replace with the port number used by Fooocus threading.Thread(target=iframe_thread, daemon=True, args=(port,)).start()

also change the code inside of shared.gradio_root.launch( TO shared.gradio_root.launch( inbrowser=args_manager.args.in_browser, server_name=args_manager.args.listen, server_port=args_manager.args.port, allowed_paths=[modules.config.path_outputs], blocked_paths=[constants.AUTH_FILENAME] )

original webui.py file Screenshot 2024-04-27 080723

modified webui.py file Screenshot 2024-04-27 080825

Screenshot 2024-04-27 080838

uncomment the entry.py file in google colab

This is a WORKING HOT FIX.

KirtiKousik commented 6 months ago

It's working now. There was a problem with gradio share api.

mashb1t commented 6 months ago

Closing as duplicate of https://github.com/lllyasviel/Fooocus/issues/2815

killergod143 commented 6 months ago

@dmitryalexander Perfect working solution , nicely explained

adumont commented 6 months ago

Still happening to me .... Will try the cloudflared alternative for now...

Al-Rien commented 6 months ago

Where do these silly mistakes come from? There's simply nothing to break there.

ishandhanani commented 6 months ago

Hitting this at the moment