mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-03 22:27:13 +08:00
Remove grad ckpt from model impl
we apply grad ckpt in train node directly
This commit is contained in:
parent
31c8cc9aa3
commit
bbcc65e7e0
@ -796,15 +796,12 @@ 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 = block(
|
||||||
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)
|
x,
|
||||||
else:
|
emb_B_D,
|
||||||
x = block(
|
crossattn_emb,
|
||||||
x,
|
crossattn_mask,
|
||||||
emb_B_D,
|
rope_emb_L_1_1_D=rope_emb_L_1_1_D,
|
||||||
crossattn_emb,
|
adaln_lora_B_3D=adaln_lora_B_3D,
|
||||||
crossattn_mask,
|
)
|
||||||
rope_emb_L_1_1_D=rope_emb_L_1_1_D,
|
|
||||||
adaln_lora_B_3D=adaln_lora_B_3D,
|
|
||||||
)
|
|
||||||
return x
|
return x
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user