Remove grad ckpt from model impl

we apply grad ckpt in train node directly
This commit is contained in:
Kohaku-Blueleaf 2025-06-13 17:51:37 +08:00 committed by GitHub
parent 31c8cc9aa3
commit bbcc65e7e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -796,9 +796,6 @@ class GeneralDITTransformerBlock(nn.Module):
adaln_lora_B_3D: Optional[torch.Tensor] = None, adaln_lora_B_3D: Optional[torch.Tensor] = None,
) -> torch.Tensor: ) -> torch.Tensor:
for block in self.blocks: for block in self.blocks:
if self.training:
x = torch.utils.checkpoint.checkpoint(block, x, emb_B_D, crossattn_emb, crossattn_mask, rope_emb_L_1_1_D, adaln_lora_B_3D, use_reentrant=False)
else:
x = block( x = block(
x, x,
emb_B_D, emb_B_D,