Skip to content

Instantly share code, notes, and snippets.

@feedsbrain
Created May 13, 2026 10:51
Show Gist options
  • Select an option

  • Save feedsbrain/805661a2d28b238a38ed4118f6211ef6 to your computer and use it in GitHub Desktop.

Select an option

Save feedsbrain/805661a2d28b238a38ed4118f6211ef6 to your computer and use it in GitHub Desktop.
ComfyUI with AMD Radeon RX6800XT GPU with 16 GB VRAM on Ubuntu 26 + ROCm 7.1.1
#!/bin/bash
source venv/bin/activate
# RX 6800 XT = gfx1030; ROCm 7.1 supports it natively — override kept for edge-case safety
export HSA_OVERRIDE_GFX_VERSION="10.3.0"
# SDMA causes hangs/illegal address on RDNA 2 under load
export HSA_ENABLE_SDMA=0
# AOTriton flash attention — production-stable on gfx1030 in ROCm 7.1
export TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1
# hipblaslt's pre-built Tensile library (TensileLibrary_lazy_gfx1030.dat) is missing from
# the PyTorch ROCm wheel for gfx1030 — fall back to hipblas which supports it correctly
export TORCH_BLAS_PREFER_HIPBLASLT=0
# MIOpen FAST mode (2): heuristic-only kernel selection — avoids minutes of exhaustive search at startup
export MIOPEN_FIND_MODE=2
# expandable_segments reduces VRAM fragmentation but caused hipErrorIllegalAddress with GFX overrides.
# garbage_collection_threshold:0.6 — trigger GC when 60% of reserved memory is in use, preventing
# stale blocks from being recycled mid-computation (fixes broken/corrupted image output).
# max_split_size_mb:256 — caps split size to reduce fragmented allocations under heavy video workloads.
export PYTORCH_HIP_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:256
# WAN video generation: use VAEDecodeTiled (not VAEDecode) to avoid VRAM OOM on long sequences.
# Only tested/working: WAN 2.2 5B model, 960×544 resolution, tile_size=256, overlap=64, temporal_size=16, temporal_overlap=4.
# Usage: ./webui.sh [any other ComfyUI args]
python main.py --enable-manager --use-split-cross-attention "$@"
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment