Get SDXL Memory Profile
Description
Determines optimal memory configuration for SDXL image generation based on available VRAM.
Usage
sdxl_memory_profile(vram_gb = NULL)
Arguments
vram_gb: Numeric. Available VRAM in GB, or NULL for auto-detection.
Details
Memory profiles for SDXL:
- full_gpu: 16GB+ - All components on CUDA
- balanced: 10-12GB - UNet + decoder on CUDA, text encoders on CPU
- unet_gpu: 6-10GB - Only UNet on CUDA, everything else CPU
- cpu_only: <6GB - All on CPU
Each profile also specifies:
- cfg_mode: “batched” or “sequential” (sequential halves peak memory)
- cleanup: “none”, “phase”, or “step” (when to clear VRAM)
- dtype: “float16” or “float32”
- max_resolution: maximum image dimension
Value
A list with memory profile settings.
Examples
# Auto-detect profile
profile <- sdxl_memory_profile()
# Specific VRAM
profile <- sdxl_memory_profile(vram_gb = 8)