fromcolossalai.nn.optimizerimportHybridAdamfromlightning.pytorchimporttrainerclassMyDiffuser(LightningModule):defconfigure_sharded_model(self)->None:# create your model hereself.model=construct_diffuser_model(...)defconfigure_optimizers(self):# use the specified optimizeroptimizer=HybridAdam(self.model.parameters(),self.lr)model=MyDiffuser()trainer=Trainer(accelerator="gpu",devices=1,precision=16,strategy="colossalai")trainer.fit(model)