ComfyUISetup » History » Version 1
Anonymous, 10/06/2024 09:48 AM
initial version
| 1 | 1 | h1. ComfyUI Setup |
|
|---|---|---|---|
| 2 | |||
| 3 | The following describes how to setup "https://www.comfy.org/":ComfyUI on Ubuntu 24.04. Note that a modern GPU is required. |
||
| 4 | |||
| 5 | h2. Install ComfyUI |
||
| 6 | |||
| 7 | ComfyUI will be installed into a Python virtual environment which keeps it somewhat isolated from the rest of the system. |
||
| 8 | |||
| 9 | # Install virtualenv if it is not already installed: |
||
| 10 | <pre> |
||
| 11 | $ sudo apt install python3.12-venv |
||
| 12 | </pre> |
||
| 13 | # Create virtualenv at @/opt/comfyui@ and then update pip: |
||
| 14 | <pre> |
||
| 15 | $ sudo python3 -m venv /opt/comfyui/ |
||
| 16 | $ sudo /opt/comfyui/bin/pip install --upgrade pip |
||
| 17 | </pre> |
||
| 18 | # Install pytorch into the virtualenv (NOTE: this assumes an NVidia GPU and the appropriate drivers must already be installed): |
||
| 19 | <pre> |
||
| 20 | $ sudo /opt/comfyui/bin/pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121 |
||
| 21 | </pre> |
||
| 22 | # Install ComfyUI within the virtualenv: |
||
| 23 | <pre> |
||
| 24 | $ cd /opt/comfyui |
||
| 25 | $ sudo mkdir comfyui |
||
| 26 | $ sudo chown -R dsorber:dsorber comfyui/ |
||
| 27 | $ cd comfyui/ |
||
| 28 | $ git clone https://github.com/comfyanonymous/ComfyUI.git . |
||
| 29 | $ sudo /opt/comfyui/bin/pip install -r requirements.txt |
||
| 30 | </pre> |
||
| 31 | # Download and install Flux model |
||
| 32 | ** https://huggingface.co/Comfy-Org/flux1-schnell/blob/main/flux1-schnell-fp8.safetensors |
||
| 33 | # Copy model to @models/checkpoints@ directory: |
||
| 34 | <pre> |
||
| 35 | mv ~/Downloads/flux1-dev-fp8.safetensors /opt/comfyui/comfyui/models/checkpoints |
||
| 36 | </pre> |
||
| 37 | # Base ComfyUI and Flux model is now installed. To run: |
||
| 38 | <pre> |
||
| 39 | $ cd /opt/comfyui/comfyui |
||
| 40 | $ ../bin/python3 main.py |
||
| 41 | </pre> |
||
| 42 | |||
| 43 | h2. Resources |
||
| 44 | |||
| 45 | * https://comfyui-wiki.com/install/install-comfyui/install-comfyui-on-linux |
||
| 46 | * https://comfyui-wiki.com/tutorial/advanced/flux1-comfyui-guide-workflow-and-examples |