"git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "a12cc0532328b93b6d8d4d5a0ca3000d0b24b72c"
Commit 5f7968f1 authored by comfyanonymous's avatar comfyanonymous
Browse files

Print the endpoint ip for localtunnel in the colab notebook.

parent 2ec6d1c6
...@@ -175,6 +175,8 @@ ...@@ -175,6 +175,8 @@
"import threading\n", "import threading\n",
"import time\n", "import time\n",
"import socket\n", "import socket\n",
"import urllib.request\n",
"\n",
"def iframe_thread(port):\n", "def iframe_thread(port):\n",
" while True:\n", " while True:\n",
" time.sleep(0.5)\n", " time.sleep(0.5)\n",
...@@ -183,7 +185,9 @@ ...@@ -183,7 +185,9 @@
" if result == 0:\n", " if result == 0:\n",
" break\n", " break\n",
" sock.close()\n", " sock.close()\n",
" print(\"\\nComfyUI finished loading, trying to launch localtunnel (if it gets stuck here localtunnel is having issues)\")\n", " print(\"\\nComfyUI finished loading, trying to launch localtunnel (if it gets stuck here localtunnel is having issues)\\n\")\n",
"\n",
" print(\"The password/enpoint ip for localtunnel is:\", urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
" p = subprocess.Popen([\"lt\", \"--port\", \"{}\".format(port)], stdout=subprocess.PIPE)\n", " p = subprocess.Popen([\"lt\", \"--port\", \"{}\".format(port)], stdout=subprocess.PIPE)\n",
" for line in p.stdout:\n", " for line in p.stdout:\n",
" print(line.decode(), end='')\n", " print(line.decode(), end='')\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment