MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / log_images

Method log_images

ldm/models/diffusion/ddpm.py:1736–1742  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

1734
1735 @torch.no_grad()
1736 def log_images(self, *args, **kwargs):
1737 log = super().log_images(*args, **kwargs)
1738 depth = self.depth_model(args[0][self.depth_stage_key])
1739 depth_min, depth_max = torch.amin(depth, dim=[1, 2, 3], keepdim=True), \
1740 torch.amax(depth, dim=[1, 2, 3], keepdim=True)
1741 log["depth"] = 2. * (depth - depth_min) / (depth_max - depth_min) - 1.
1742 return log
1743
1744
1745class LatentUpscaleFinetuneDiffusion(LatentFinetuneDiffusion):

Callers

nothing calls this directly

Calls 1

log_imagesMethod · 0.45

Tested by

no test coverage detected