You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
12 KiB

{"cells":[{"cell_type":"markdown","metadata":{"id":"aaaaaaaaaa"},"source":["Git clone the repo and install the requirements. (ignore the pip errors about protobuf)"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"bbbbbbbbbb"},"outputs":[],"source":["#@title Environment Setup\n","\n","from pathlib import Path\n","\n","OPTIONS = {}\n","\n","USE_GOOGLE_DRIVE = False #@param {type:\"boolean\"}\n","UPDATE_COMFY_UI = True #@param {type:\"boolean\"}\n","USE_COMFYUI_MANAGER = True #@param {type:\"boolean\"}\n","INSTALL_CUSTOM_NODES_DEPENDENCIES = True #@param {type:\"boolean\"}\n","OPTIONS['USE_GOOGLE_DRIVE'] = USE_GOOGLE_DRIVE\n","OPTIONS['UPDATE_COMFY_UI'] = UPDATE_COMFY_UI\n","OPTIONS['USE_COMFYUI_MANAGER'] = USE_COMFYUI_MANAGER\n","OPTIONS['INSTALL_CUSTOM_NODES_DEPENDENCIES'] = INSTALL_CUSTOM_NODES_DEPENDENCIES\n","\n","current_dir = !pwd\n","WORKSPACE = f\"{current_dir[0]}/ComfyUI\"\n","\n","if OPTIONS['USE_GOOGLE_DRIVE']:\n"," !echo \"Mounting Google Drive...\"\n"," %cd /\n","\n"," from google.colab import drive\n"," drive.mount('/content/drive')\n","\n"," WORKSPACE = \"/content/drive/MyDrive/ComfyUI\"\n"," %cd /content/drive/MyDrive\n","\n","![ ! -d $WORKSPACE ] && echo -= Initial setup ComfyUI =- && git clone https://github.com/comfyanonymous/ComfyUI\n","%cd $WORKSPACE\n","\n","if OPTIONS['UPDATE_COMFY_UI']:\n"," !echo -= Updating ComfyUI =-\n"," !git pull\n","\n","!echo -= Install dependencies =-\n","!pip install xformers!=0.0.18 -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu118 --extra-index-url https://download.pytorch.org/whl/cu117\n","\n","if OPTIONS['USE_COMFYUI_MANAGER']:\n"," %cd custom_nodes\n"," ![ ! -d ComfyUI-Manager ] && echo -= Initial setup ComfyUI-Manager =- && git clone https://github.com/ltdrdata/ComfyUI-Manager\n"," %cd ComfyUI-Manager\n"," !git pull\n","\n","%cd $WORKSPACE\n","\n","if OPTIONS['INSTALL_CUSTOM_NODES_DEPENDENCIES']:\n"," !echo -= Install custom nodes dependencies =-\n"," ![ -f \"custom_nodes/ComfyUI-Manager/scripts/colab-dependencies.py\" ] && python \"custom_nodes/ComfyUI-Manager/scripts/colab-dependencies.py\"\n","\n","\n","\n"]},{"cell_type":"markdown","metadata":{"id":"cccccccccc"},"source":["Download some models/checkpoints/vae or custom comfyui nodes (uncomment the commands for the ones you want)"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"dddddddddd"},"outputs":[],"source":["# Checkpoints\n","\n","# SD1.5\n","!wget -c https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt -P ./models/checkpoints/\n","\n","# SD2\n","#!wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.safetensors -P ./models/checkpoints/\n","#!wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors -P ./models/checkpoints/\n","\n","# Some SD1.5 anime style\n","#!wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_hard.safetensors -P ./models/checkpoints/\n","#!wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A1_orangemixs.safetensors -P ./models/checkpoints/\n","#!wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A3_orangemixs.safetensors -P ./models/checkpoints/\n","#!wget -c https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp16-pruned.safetensors -P ./models/checkpoints/\n","\n","# Waifu Diffusion 1.5 (anime style SD2.x 768-v)\n","#!wget -c https://huggingface.co/waifu-diffusion/wd-1-5-beta2/resolve/main/checkpoints/wd-1-5-beta2-fp16.safetensors -P ./models/checkpoints/\n","\n","\n","# unCLIP models\n","#!wget -c https://huggingface.co/comfyanonymous/illuminatiDiffusionV1_v11_unCLIP/resolve/main/illuminatiDiffusionV1_v11-unclip-h-fp16.safetensors -P ./models/checkpoints/\n","#!wget -c https://huggingface.co/comfyanonymous/wd-1.5-beta2_unCLIP/resolve/main/wd-1-5-beta2-aesthetic-unclip-h-fp16.safetensors -P ./model