Fix issue where compile true did not actually compile the model

This commit is contained in:
Jaret Burkett committed 2026-03-31 09:27:54 -06:00
1 parent e22039e4aa
commit 0045260af7
1 file changed
+1 -1
+1 -1
View File
@@ -1618,7 +1618,7 @@ class BaseSDTrainProcess(BaseTrainProcess):
# compile the model if needed
if self.model_config.compile:
try:
torch.compile(self.sd.unet, dynamic=True, fullgraph=True, mode='max-autotune')
self.sd.unet = torch.compile(self.sd.unet, dynamic=True, fullgraph=True, mode='max-autotune')
except Exception as e:
print_acc(f"Failed to compile model: {e}")
print_acc("Continuing without compilation")