mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Add a colab notebook.
This commit is contained in:
parent
b9308407b2
commit
d0b16c9969
@ -49,6 +49,10 @@ Dragging a generated png on the webpage or loading one will give you the full wo
|
||||
|
||||
You can use () to change emphasis of a word or phrase like: (good code:1.2) or (bad code:0.8). The default emphasis for () is 1.1. To use () characters in your actual prompt escape them like \\( or \\).
|
||||
|
||||
### Colab Notebook
|
||||
|
||||
To run it on colab you can use my colab notebook here: [Colab Notebook](notebooks/comfyui_colab.ipynb)
|
||||
|
||||
### Fedora
|
||||
|
||||
To get python 3.10 on fedora:
|
||||
|
109
notebooks/comfyui_colab.ipynb
Normal file
109
notebooks/comfyui_colab.ipynb
Normal file
@ -0,0 +1,109 @@
|
||||
{
|
||||
"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": [
|
||||
"Git clone the repo and install the requirements. "
|
||||
],
|
||||
"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": [
|
||||
"Download the models/checkpoints/vae:"
|
||||
],
|
||||
"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",
|
||||
"!wget https://huggingface.co/stabilityai/sd-vae-ft-mse-original/blob/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/"
|
||||
],
|
||||
"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",
|
||||
"print(\"click this once the GUI is loaded:\")\n",
|
||||
"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": []
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user