import os import torch # Diffusion Model IDs MODEL_ID_BASE = "stabilityai/stable-diffusion-xl-base-1.0" MODEL_ID_CANNY = "diffusers/controlnet-sdxl-1.0-canny" MODEL_ID_DEPTH = "diffusers/controlnet-sdxl-1.0-depth" # Hardware Configuration DEVICE = "cuda" if torch.cuda.is_available() else "cpu" # Use bfloat16 for supported GPUs (e.g., A100, H100, H200) for performance, else float32 DTYPE = torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else torch.float32 print(f"Initialized config: Device={DEVICE}, DType={DTYPE}")