Comfyui (#814)
* Init ComfyUI dev branch Testing * Fixed url build.func testing * Revert urls * Removed subfunctions * Updated .sh correct url for testing * Fixed install.func for testing * Fixed urls for testing * Added manager installation * Revert urls * Updated script * Removed comments from comfyui.sh * Updated script * Updated script * Updated script * Updated Debian 13 * Updated Debian 13 * Changed apt-get
This commit is contained in:
parent
300db370f0
commit
5441f790c4
42
ct/comfyui.sh
Normal file
42
ct/comfyui.sh
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: jdacode
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/comfyanonymous/ComfyUI
|
||||||
|
|
||||||
|
APP="ComfyUI"
|
||||||
|
var_tags="${var_tags:-ai}"
|
||||||
|
var_cpu="${var_cpu:-4}"
|
||||||
|
var_ram="${var_ram:-8192}"
|
||||||
|
var_disk="${var_disk:-25}"
|
||||||
|
var_os="${var_os:-debian}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
|
||||||
|
if [[ ! -f /opt/${APP} ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
msg_error "To update use the ${APP} Manager."
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8188${CL}"
|
43
frontend/public/json/comfyui.json
Normal file
43
frontend/public/json/comfyui.json
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "ComfyUI",
|
||||||
|
"slug": "comfyui",
|
||||||
|
"categories": [
|
||||||
|
20
|
||||||
|
],
|
||||||
|
"date_created": "2025-08-01",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 8188,
|
||||||
|
"documentation": "https://github.com/comfyanonymous/ComfyUI",
|
||||||
|
"website": "https://www.comfy.org/",
|
||||||
|
"logo": "https://framerusercontent.com/images/3cNQMWKzIhIrQ5KErBm7dSmbd2w.png",
|
||||||
|
"description": "ComfyUI is a node-based interface and inference engine for generative AI. Users can combine various AI models and operations through nodes to achieve highly customizable and controllable content generation.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/comfyui.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 4,
|
||||||
|
"ram": 8192,
|
||||||
|
"hdd": 25,
|
||||||
|
"os": "debian",
|
||||||
|
"version": "13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Application takes long time to install. Please be patient!",
|
||||||
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Please check that you have installed the drivers for your GPU.",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
87
install/comfyui-install.sh
Normal file
87
install/comfyui-install.sh
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: jdacode
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/comfyanonymous/ComfyUI
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "${TAB3}Choose the GPU type for ComfyUI:"
|
||||||
|
echo "${TAB3}[1]-None [2]-NVIDIA [3]-AMD [4]-Intel"
|
||||||
|
read -rp "${TAB3}Enter your choice [1-4] (default: 1): " gpu_choice
|
||||||
|
gpu_choice=${gpu_choice:-1}
|
||||||
|
case "$gpu_choice" in
|
||||||
|
1) comfyui_gpu_type="none";;
|
||||||
|
2) comfyui_gpu_type="nvidia";;
|
||||||
|
3) comfyui_gpu_type="amd";;
|
||||||
|
4) comfyui_gpu_type="intel";;
|
||||||
|
*) comfyui_gpu_type="none"; echo "${TAB3}Invalid choice. Defaulting to ${comfyui_gpu_type}." ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
|
||||||
|
PYTHON_VERSION="3.12" setup_uv
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "ComfyUI" "comfyanonymous/ComfyUI" "tarball" "latest" "/opt/ComfyUI"
|
||||||
|
|
||||||
|
msg_info "Python dependencies"
|
||||||
|
$STD uv venv "/opt/ComfyUI/venv"
|
||||||
|
if [[ "${comfyui_gpu_type,,}" == "nvidia" ]]; then
|
||||||
|
$STD uv pip install \
|
||||||
|
torch \
|
||||||
|
torchvision \
|
||||||
|
torchaudio \
|
||||||
|
--extra-index-url "https://download.pytorch.org/whl/cu128" \
|
||||||
|
--python="/opt/ComfyUI/venv/bin/python"
|
||||||
|
elif [[ "${comfyui_gpu_type,,}" == "amd" ]]; then
|
||||||
|
$STD uv pip install \
|
||||||
|
torch \
|
||||||
|
torchvision \
|
||||||
|
torchaudio \
|
||||||
|
--index-url "https://download.pytorch.org/whl/rocm6.3" \
|
||||||
|
--python="/opt/ComfyUI/venv/bin/python"
|
||||||
|
elif [[ "${comfyui_gpu_type,,}" == "intel" ]]; then
|
||||||
|
$STD uv pip install \
|
||||||
|
torch \
|
||||||
|
torchvision \
|
||||||
|
torchaudio \
|
||||||
|
--index-url "https://download.pytorch.org/whl/xpu" \
|
||||||
|
--python="/opt/ComfyUI/venv/bin/python"
|
||||||
|
fi
|
||||||
|
$STD uv pip install -r "/opt/ComfyUI/requirements.txt" --python="/opt/ComfyUI/venv/bin/python"
|
||||||
|
msg_ok "Python dependencies"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/comfyui.service
|
||||||
|
[Unit]
|
||||||
|
Description=ComfyUI Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/opt/ComfyUI
|
||||||
|
ExecStart=/opt/ComfyUI/venv/bin/python /opt/ComfyUI/main.py --listen --port 8188 --cpu
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now comfyui
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt -y autoremove
|
||||||
|
$STD apt -y autoclean
|
||||||
|
$STD apt -y clean
|
||||||
|
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user