MCPcopy Create free account
hub / github.com/Monalissaa/DisenDiff / __call__

Method __call__

src/attention_controllers.py:16–21  ·  view source on GitHub ↗
(self, attn, is_cross: bool = True, place_in_unet: str = None)

Source from the content-addressed store, hash-verified

14
15 # def forward(self, attn, is_cross: bool = True, place_in_unet: str = None):
16 def __call__(self, attn, is_cross: bool = True, place_in_unet: str = None):
17 # key = f"{place_in_unet}_{'cross' if is_cross else 'self'}"
18 # if attn.shape[1] <= 32 ** 2: # avoid memory overhead
19 key = math.sqrt(attn.shape[1])
20 self.step_store[key].append(attn)
21 return
22
23
24

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected