MCPcopy Create free account
hub / github.com/Gadersd/stable-diffusion-burn / __init__

Method __init__

python/dump.py:224–230  ·  view source on GitHub ↗
(self, dim, context_dim, n_heads, d_head)

Source from the content-addressed store, hash-verified

222
223class BasicTransformerBlock:
224 def __init__(self, dim, context_dim, n_heads, d_head):
225 self.attn1 = CrossAttention(dim, dim, n_heads, d_head)
226 self.ff = FeedForward(dim)
227 self.attn2 = CrossAttention(dim, context_dim, n_heads, d_head)
228 self.norm1 = LayerNorm(dim)
229 self.norm2 = LayerNorm(dim)
230 self.norm3 = LayerNorm(dim)
231
232 def __call__(self, x, context=None):
233 x = self.attn1(self.norm1(x)) + x

Callers

nothing calls this directly

Calls 2

CrossAttentionClass · 0.85
FeedForwardClass · 0.85

Tested by

no test coverage detected