VRAM & CUDA Tuning
Solving the T5-XXL FP8 & BF16 Text Encoder RAM Cliff
Prevent Linux SIGKILL crashes during Flux.1 prompt encoding by sizing host RAM for T5-XXL (4.9-9.8 GB) and dropping to FP8 or Q5_K_M GGUF.
BF16 T5: 9.8 GB · FP8 T5: 4.9 GB · Q5_K_M: 3.6 GB
Why ComfyUI Crashes Before Step 1 Even Starts
Flux.1 loads both CLIP-L and T5-XXL before touching the DiT sampler. On 16-32 GB host RAM VMs without swap, deserializing 9.8 GB BF16 T5-XXL triggers immediate Linux OOM termination.
FP8 E4M3FN Quality Parity
Switching from BF16 T5-XXL to t5xxl_fp8_e4m3fn cuts encoder memory in half with virtually indistinguishable prompt adherence across photographic and stylized prompts.
Measured Thresholds & ComfyUI Configuration Matrix
| T5-XXL Variant | Weight Size | Host RAM Required (w/ Staging) |
|---|---|---|
| t5xxl_fp16 / bf16.safetensors | 9.8 GB | 32 GB Minimum / 64 GB Safe |
| t5xxl_fp8_e4m3fn.safetensors | 4.9 GB | 16 GB Minimum / 32 GB Safe |
| t5-v1_1-xxl-Q5_K_M.gguf | 3.6 GB | 16 GB Safe (Ideal for --lowvram) |