mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-05-11 08:20:35 +00:00
Fix issue where compile true did not actually compile the model
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user