FLUX.2 AMD GPU Server Setup | Generated by AI

Home 2026.07

✅ Comprehensive Summary

Server Setup

Step Status
SSH connection test ✅ Connected
GPU detection (ROCm) ✅ AMD Radeon GPU, 48GB VRAM
tmux installed
Python venv created (/root/flux_env)

GPU Specs

Software Installed

Package Version Notes
PyTorch 2.13.0+rocm7.2 ROCm 7.2 compatible
diffusers 0.39.0 Latest
transformers 4.57.6 Downgraded from 5.x for compatibility
accelerate 1.14.0 For CPU offloading
sentencepiece 0.2.2 Tokenizer
huggingface-hub logged in with token HF mirror configured

Issues Encountered & Fixes

  1. No network to huggingface.co → Used HF_ENDPOINT=https://hf-mirror.com (Tsinghua mirror)

  2. Transformers 5.x incompatible with diffusers → Downgraded to transformers==4.57.6

  3. Wrong pipeline class → FLUX.2-dev uses Flux2Pipeline (not FluxPipeline)

  4. OOM on pipe.to("cuda") → Model ~35GB in bf16, tried to load all at once into 48GB VRAM → Fixed with pipe.enable_model_cpu_offload() (keeps only one component on GPU at a time)

Final Script (/root/run_flux.py)

How to Run

ssh -p 31145 root@36.150.116.206
tmux new -s flux
source /root/flux_env/bin/activate
python3 /root/run_flux.py

Detach with Ctrl+B, D · Re-attach with tmux attach -t flux


Generated by AI. Curating and sharing still takes effort. If you find it useful, feel free to donate. WeChat: @lzwjavaWeChat QR · X: @lzwjava · Say hi 👋

Back Donate