diff --git a/comfyui-rocm/.gitignore b/comfyui-rocm/.gitignore new file mode 100644 index 0000000..70cd356 --- /dev/null +++ b/comfyui-rocm/.gitignore @@ -0,0 +1,4 @@ +venv/ +webui/ +models/ +*.log \ No newline at end of file diff --git a/comfyui-rocm/install.sh b/comfyui-rocm/install.sh new file mode 100755 index 0000000..885cfa0 --- /dev/null +++ b/comfyui-rocm/install.sh @@ -0,0 +1,42 @@ +#!/bin/bash +source ../utils.sh +python_exec=venv/bin/python3.10 + +NAME="ComfyUI" + +# Function to install/update +install() { + if [ -d "webui" ]; then + echo $NAME "is already installed. Updating..." + yes_or_no "Do you want to update $NAME?" && { + cd webui + git pull + echo "$NAME WebUI successfully updated." + } + + else + echo "Cloning $NAME repository..." + git clone https://github.com/comfyanonymous/ComfyUI.git webui + + echo "Running $NAME setup..." + $python_exec -m pip install -r webui/requirements.txt + + # Install manager + cd webui/custom_nodes + git clone https://github.com/ltdrdata/ComfyUI-Manager.git + + ln -s webui/models models + fi + +} + +# Main function +main() { + prepare_env + install + clean + echo "$NAME installation/update complete. Use ./run.sh to start" +} + +# Run main function +main diff --git a/comfyui-rocm/run.sh b/comfyui-rocm/run.sh new file mode 100755 index 0000000..9498f6a --- /dev/null +++ b/comfyui-rocm/run.sh @@ -0,0 +1,18 @@ +#!/bin/bash +source ../utils.sh +python_exec=venv/bin/python3.10 + +# Main function +main() { + # Create virtual environment + use_venv + + # Prints ROCM info with available GPUs + rocm-smi + + # Start + TORCH_BLAS_PREFER_HIPBLASLT=0 $python_exec webui/main.py + +} + +main