MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / forward

Method forward

sat/sgm/modules/diffusionmodules/util.py:320–328  ·  view source on GitHub ↗
(
        self,
        x_spatial: torch.Tensor,
        x_temporal: torch.Tensor,
        image_only_indicator: Optional[torch.Tensor] = None,
    )

Source from the content-addressed store, hash-verified

318 return alpha
319
320 def forward(
321 self,
322 x_spatial: torch.Tensor,
323 x_temporal: torch.Tensor,
324 image_only_indicator: Optional[torch.Tensor] = None,
325 ) -> torch.Tensor:
326 alpha = self.get_alpha(image_only_indicator)
327 x = alpha.to(x_spatial.dtype) * x_spatial + (1.0 - alpha).to(x_spatial.dtype) * x_temporal
328 return x

Callers

nothing calls this directly

Calls 2

get_alphaMethod · 0.95
toMethod · 0.80

Tested by

no test coverage detected