MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / forward

Method forward

src/diffusers/models/upsampling.py:320–327  ·  view source on GitHub ↗
(self, hidden_states: torch.FloatTensor)

Source from the content-addressed store, hash-verified

318 return output
319
320 def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor:
321 if self.use_conv:
322 height = self._upsample_2d(hidden_states, self.Conv2d_0.weight, kernel=self.fir_kernel)
323 height = height + self.Conv2d_0.bias.reshape(1, -1, 1, 1)
324 else:
325 height = self._upsample_2d(hidden_states, kernel=self.fir_kernel, factor=2)
326
327 return height
328
329
330class KUpsample2D(nn.Module):

Callers

nothing calls this directly

Calls 1

_upsample_2dMethod · 0.95

Tested by

no test coverage detected