From 43b22b91ee545878ac79ac0ec3cc8d5ba7fef631 Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Fri, 12 Jun 2026 12:26:16 -0600 Subject: [PATCH] Add a triton check on compile --- jobs/process/BaseSDTrainProcess.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/jobs/process/BaseSDTrainProcess.py b/jobs/process/BaseSDTrainProcess.py index ca43531..fd2ef1d 100644 --- a/jobs/process/BaseSDTrainProcess.py +++ b/jobs/process/BaseSDTrainProcess.py @@ -2079,7 +2079,18 @@ class BaseSDTrainProcess(BaseTrainProcess): is_quantized = getattr(self.model_config, 'quantize', False) or \ getattr(self.model_config, 'quantize_te', False) - if is_quantized and is_unet_offloaded: + try: + from torch.utils._triton import has_triton + triton_available = has_triton() + except Exception: + triton_available = False + + if not triton_available: + print_acc("WARNING: compile is disabled.") + print_acc("Triton is not available or not working on this system.") + print_acc("Install a working 'triton' package to use compile.") + print_acc("Continuing without compilation.") + elif is_quantized and is_unet_offloaded: print_acc("WARNING: compile is disabled.") print_acc("Quantized models with Transformer offloading are incompatible.") print_acc("Disable Transformer offload to use compile.")