MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / forward

Method forward

architecture/attention_processor.py:4831–4836  ·  view source on GitHub ↗
(self, f: torch.Tensor, zq: torch.Tensor)

Source from the content-addressed store, hash-verified

4829 self.conv_b = nn.Conv2d(zq_channels, f_channels, kernel_size=1, stride=1, padding=0)
4830
4831 def forward(self, f: torch.Tensor, zq: torch.Tensor) -> torch.Tensor:
4832 f_size = f.shape[-2:]
4833 zq = F.interpolate(zq, size=f_size, mode="nearest")
4834 norm_f = self.norm_layer(f)
4835 new_f = norm_f * self.conv_y(zq) + self.conv_b(zq)
4836 return new_f
4837
4838
4839class IPAdapterAttnProcessor(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected