MCPcopy Create free account
hub / github.com/apple/ml-stable-diffusion / Upsample2D

Class Upsample2D

python_coreml_stable_diffusion/unet.py:485–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483
484
485class Upsample2D(nn.Module):
486
487 def __init__(self, channels):
488 super().__init__()
489 self.conv = nn.Conv2d(channels, channels, 3, padding=1)
490
491 def forward(self, x):
492 x = F.interpolate(x, scale_factor=2.0, mode="nearest")
493 return self.conv(x)
494
495
496class Downsample2D(nn.Module):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected