comfyui_colab.ipynb 2.71 KB
Newer Older
comfyanonymous's avatar
comfyanonymous committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU",
    "gpuClass": "standard"
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
22
        "Git clone the repo and install the requirements. (ignore the pip errors about protobuf)"
comfyanonymous's avatar
comfyanonymous committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
      ],
      "metadata": {
        "id": "aaaaaaaaaa"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "bbbbbbbbbb"
      },
      "outputs": [],
      "source": [
        "!git clone https://github.com/comfyanonymous/ComfyUI\n",
        "%cd ComfyUI\n",
        "!pip install -r requirements.txt"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
44
        "Download some models/checkpoints/vae:"
comfyanonymous's avatar
comfyanonymous committed
45
46
47
48
49
50
51
52
53
      ],
      "metadata": {
        "id": "cccccccccc"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "!wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt -P ./models/checkpoints/\n",
54
        "!wget https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/\n",
55
        "!wget https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_hard.safetensors -P ./models/checkpoints/\n"
comfyanonymous's avatar
comfyanonymous committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
      ],
      "metadata": {
        "id": "dddddddddd"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "Launch a http server to see the output pics:"
      ],
      "metadata": {
        "id": "eeeeeeeeee"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from google.colab import output\n",
        "output.serve_kernel_port_as_window(8000)\n",
        "get_ipython().system_raw('cd output && python3 -m http.server 8000 &') "
      ],
      "metadata": {
        "id": "ffffffffff"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "Run ComfyUI:"
      ],
      "metadata": {
        "id": "gggggggggg"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from google.colab import output\n",
98
        "print(\"open this next link instead once the software prints: To see the GUI go to\")\n",
comfyanonymous's avatar
comfyanonymous committed
99
100
101
102
103
104
105
106
107
108
109
110
        "output.serve_kernel_port_as_window(8188)\n",
        "!sed -i 's/127.0.0.1/0.0.0.0/g' main.py\n",
        "!python main.py"
      ],
      "metadata": {
        "id": "hhhhhhhhhh"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}