This commit is contained in:
mike
2026-06-18 00:06:15 +02:00
parent 2d0322465d
commit 1dead1c666
32 changed files with 3332 additions and 65 deletions

12
tour-comfy/run_comfyui.sh Normal file → Executable file
View File

@@ -2,18 +2,22 @@
# Launch the ComfyUI backend (headless) for the Qwen-Image-Edit API.
# gfx906 (MI50) has no flash-attention, so use the pytorch cross-attention path.
set -e
BASE=/media/tour/APPS/comfyui
cd "$BASE/ComfyUI"
source "$BASE/venv/bin/activate"
# env.sh resolves BASE/COMFY/VENV (and keeps the venv off NTFS). Portable
# across hosts (tour: /media/tour/APPS/comfyui, hubby: /home/hubby/comfyui).
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/env.sh"
cd "$COMFY"
source "$VENV/bin/activate"
# MI50 / Vega20 is happiest in fp16; avoid bf16 emulation.
export PYTORCH_HIP_ALLOC_CONF=expandable_segments:True
export PYTORCH_HIP_ALLOC_CONF="expandable_segments:True,garbage_collection_threshold:0.8"
export HSA_ENABLE_SDMA=0
# Split cross-attention chunks the attention matmul -> much lower peak VRAM,
# which is what lets the 20B Q8 edit model + reference-image sequence fit in 32GB.
# --lowvram offloads models to CPU RAM when not in use, preventing OOM.
exec python main.py \
--listen 127.0.0.1 \
--port 8188 \
--use-split-cross-attention \
--lowvram \
"$@"