Files
runpod/models/comfyui/start.sh
Sebastian Krüger 205e591fb4 feat: add ComfyUI integration with Ansible playbook
- Add ComfyUI installation to Ansible playbook with 'comfyui' tag
- Create ComfyUI requirements.txt and start.sh script
- Clone ComfyUI from official GitHub repository
- Symlink HuggingFace cache for Flux model access
- ComfyUI runs on port 8188 with CORS enabled
- Add ComfyUI to services list in playbook

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 20:41:43 +01:00

30 lines
673 B
Bash

#!/bin/bash
#
# ComfyUI Startup Script
# Starts ComfyUI server on port 8188
#
WORKSPACE_DIR="${WORKSPACE_DIR:-/workspace}"
COMFYUI_DIR="${WORKSPACE_DIR}/ComfyUI"
HF_CACHE="${WORKSPACE_DIR}/huggingface_cache"
# Set environment variables
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
export HF_HOME="${HF_CACHE}"
# Navigate to ComfyUI directory
cd "${COMFYUI_DIR}" || exit 1
echo "Starting ComfyUI on port 8188..."
echo "Access at: http://localhost:8188"
echo "Using HuggingFace cache: ${HF_CACHE}"
# Start ComfyUI with GPU support
python3 main.py \
--listen 0.0.0.0 \
--port 8188 \
--enable-cors-header \
--preview-method auto
echo "ComfyUI stopped"