Method
__init__
(self, theta: int, axes_dim: List[int])
Source from the content-addressed store, hash-verified
| 692 | class FluxPosEmbed(nn.Module): |
| 693 | # modified from https://github.com/black-forest-labs/flux/blob/c00d7c60b085fce8058b9df845e036090873f2ce/src/flux/modules/layers.py#L11 |
| 694 | def __init__(self, theta: int, axes_dim: List[int]): |
| 695 | super().__init__() |
| 696 | self.theta = theta |
| 697 | self.axes_dim = axes_dim |
| 698 | |
| 699 | def forward(self, ids: torch.Tensor) -> torch.Tensor: |
| 700 | n_axes = ids.shape[-1] |
Callers
nothing calls this directly
Tested by
no test coverage detected