MCPcopy Create free account
hub / github.com/ali-vilab/ACE_plus / __init__

Method __init__

modules/layers.py:385–393  ·  view source on GitHub ↗
(self, hidden_size: int,
                    num_heads: int,
                    mlp_ratio: float = 4.0,
                    qk_scale: float | None = None,
                    backend='pytorch',
                    abondon_cond = False)

Source from the content-addressed store, hash-verified

383 """
384
385 def __init__(self, hidden_size: int,
386 num_heads: int,
387 mlp_ratio: float = 4.0,
388 qk_scale: float | None = None,
389 backend='pytorch',
390 abondon_cond = False):
391 super().__init__(hidden_size, num_heads, mlp_ratio,
392 qk_scale, backend)
393 self.abondon_cond = abondon_cond
394
395 def forward(self, x: Tensor, vec: Tensor, pe: Tensor, mask: Tensor = None,
396 uncondi_length = None, uncondi_pe = None, mask_uncond = None) -> Tensor:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected