20 lines
660 B
Bash
20 lines
660 B
Bash
#!/bin/bash
|
|
# 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"
|
|
|
|
# MI50 / Vega20 is happiest in fp16; avoid bf16 emulation.
|
|
export PYTORCH_HIP_ALLOC_CONF=expandable_segments:True
|
|
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.
|
|
exec python main.py \
|
|
--listen 127.0.0.1 \
|
|
--port 8188 \
|
|
--use-split-cross-attention \
|
|
"$@"
|