MCPcopy Create free account
hub / github.com/MegaScenes/nvs / __init__

Method __init__

ldm/modules/diffusionmodules/model.py:43–51  ·  view source on GitHub ↗
(self, in_channels, with_conv)

Source from the content-addressed store, hash-verified

41
42class Upsample(nn.Module):
43 def __init__(self, in_channels, with_conv):
44 super().__init__()
45 self.with_conv = with_conv
46 if self.with_conv:
47 self.conv = torch.nn.Conv2d(in_channels,
48 in_channels,
49 kernel_size=3,
50 stride=1,
51 padding=1)
52
53 def forward(self, x):
54 x = torch.nn.functional.interpolate(x, scale_factor=2.0, mode="nearest")

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected