MCPcopy Create free account
hub / github.com/huggingface/diffusers / __init__

Method __init__

src/diffusers/models/unets/uvit_2d.py:230–234  ·  view source on GitHub ↗
(self, in_channels, block_out_channels, vocab_size, elementwise_affine, eps, bias)

Source from the content-addressed store, hash-verified

228
229class UVit2DConvEmbed(nn.Module):
230 def __init__(self, in_channels, block_out_channels, vocab_size, elementwise_affine, eps, bias):
231 super().__init__()
232 self.embeddings = nn.Embedding(vocab_size, in_channels)
233 self.layer_norm = RMSNorm(in_channels, eps, elementwise_affine)
234 self.conv = nn.Conv2d(in_channels, block_out_channels, kernel_size=1, bias=bias)
235
236 def forward(self, input_ids):
237 embeddings = self.embeddings(input_ids)

Callers

nothing calls this directly

Calls 2

RMSNormClass · 0.50
__init__Method · 0.45

Tested by

no test coverage detected