Add support for training with an accuracy recovery adapter with qwen image
This commit is contained in:
@@ -1533,6 +1533,14 @@ class BaseSDTrainProcess(BaseTrainProcess):
|
||||
# run base sd process run
|
||||
self.sd.load_model()
|
||||
|
||||
# compile the model if needed
|
||||
if self.model_config.compile:
|
||||
try:
|
||||
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")
|
||||
|
||||
self.sd.add_after_sample_image_hook(self.sample_step_hook)
|
||||
|
||||
dtype = get_torch_dtype(self.train_config.dtype)
|
||||
|
||||
Reference in New Issue
Block a user