Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
266db206
"git@developer.sourcefind.cn:chenpangpang/parler-tts.git" did not exist on "62d6bf69c8ec2dbbcab4e2163bc1a9a24d676321"
Commit
266db206
authored
Jan 27, 2023
by
comfyanonymous
Browse files
Update colab notebook to use an iframe for GUI.
parent
9fa18279
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
notebooks/comfyui_colab.ipynb
notebooks/comfyui_colab.ipynb
+17
-5
No files found.
notebooks/comfyui_colab.ipynb
View file @
266db206
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"source": [
"source": [
"Launch a http server to see the output pics:"
"
Optional:
Launch a http server to see the output pics
(you can also download them by browsing to the output directory with colab)
:"
],
],
"metadata": {
"metadata": {
"id": "eeeeeeeeee"
"id": "eeeeeeeeee"
...
@@ -94,10 +94,22 @@
...
@@ -94,10 +94,22 @@
{
{
"cell_type": "code",
"cell_type": "code",
"source": [
"source": [
"from google.colab import output\n",
"import threading\n",
"print(\"open this next link instead once the software prints: To see the GUI go to\")\n",
"import time\n",
"output.serve_kernel_port_as_window(8188)\n",
"import socket\n",
"!sed -i 's/127.0.0.1/0.0.0.0/g' main.py\n",
"def iframe_thread(port):\n",
" while True:\n",
" time.sleep(0.5)\n",
" sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n",
" result = sock.connect_ex(('127.0.0.1', port))\n",
" if result == 0:\n",
" break\n",
" sock.close()\n",
" from google.colab import output\n",
" x = output.serve_kernel_port_as_window(port)\n",
" x = output.serve_kernel_port_as_iframe(port, height=1024)\n",
"threading.Thread(target=iframe_thread, daemon=True, args=(8188,)).start()\n",
"\n",
"!python main.py"
"!python main.py"
],
],
"metadata": {
"metadata": {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment