name: Setup Frontend description: 'Setup ComfyUI frontend development environment' inputs: extra_server_params: description: 'Additional parameters to pass to ComfyUI server' required: false default: '' runs: using: 'composite' steps: - name: Checkout ComfyUI uses: actions/checkout@v4 with: repository: 'comfyanonymous/ComfyUI' path: 'ComfyUI' - name: Checkout ComfyUI_frontend uses: actions/checkout@v4 with: repository: 'Comfy-Org/ComfyUI_frontend' path: 'ComfyUI_frontend' - name: Copy ComfyUI_devtools from frontend repo shell: bash run: | mkdir -p ComfyUI/custom_nodes/ComfyUI_devtools cp -r ComfyUI_frontend/tools/devtools/* ComfyUI/custom_nodes/ComfyUI_devtools/ - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 10 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 'lts/*' cache: 'pnpm' cache-dependency-path: 'ComfyUI_frontend/pnpm-lock.yaml' - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10' - name: Install Python requirements shell: bash working-directory: ComfyUI run: | python -m pip install --upgrade pip pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu pip install -r requirements.txt pip install wait-for-it - name: Build & Install ComfyUI_frontend shell: bash working-directory: ComfyUI_frontend run: | pnpm install --frozen-lockfile pnpm build - name: Start ComfyUI server shell: bash working-directory: ComfyUI run: | python main.py --cpu --multi-user --front-end-root ../ComfyUI_frontend/dist ${{ inputs.extra_server_params }} & wait-for-it --service 127.0.0.1:8188 -t 600