Fix gradient checkpointing for sapiens DFE

This commit is contained in:
Jaret Burkett committed 2026-09-08 12:24:56 -06:00
1 parent 3ab6eaa3c4
commit af82197907
2 files changed
+3 -1

No files matched your search

@@ -1094,6 +1094,7 @@ class DiffusionFeatureExtractor9(nn.Module):
self.model = Sapiens2(arch="sapiens2_1b", img_size=(1024, 768), patch_size=16).eval().cuda() # img_size is (H, W)
self.model.load_state_dict(load_file(ckpt_path))
self.model.to(device, dtype=dtype)
self.model.enable_gradient_checkpointing()
self.losses = {}
self.log_every = 100