added comfyui

This commit is contained in:
Mathieu Broillet 2024-08-20 22:40:52 +02:00
parent 65a7f146d9
commit c5ba1d3e65
Signed by: mathieu
GPG Key ID: A08E484FE95074C1
3 changed files with 64 additions and 0 deletions

4
comfyui-rocm/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
venv/
webui/
models/
*.log

42
comfyui-rocm/install.sh Executable file
View File

@ -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

18
comfyui-rocm/run.sh Executable file
View File

@ -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