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

Method __call__

python/dump.py:171–177  ·  view source on GitHub ↗
(self, x, emb)

Source from the content-addressed store, hash-verified

169 self.skip_connection = Conv2d(channels, out_channels, 1) if channels != out_channels else lambda x: x
170
171 def __call__(self, x, emb):
172 h = x.sequential(self.in_layers)
173 emb_out = emb.sequential(self.emb_layers)
174 h = h + emb_out.reshape(*emb_out.shape, 1, 1)
175 h = h.sequential(self.out_layers)
176 ret = self.skip_connection(x) + h
177 return ret
178
179class CrossAttention:
180 def __init__(self, query_dim, context_dim, n_heads, d_head):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected