(self)
| 107 | |
| 108 | class CogDiT(torch.nn.Module): |
| 109 | def __init__(self): |
| 110 | super().__init__() |
| 111 | self.patchify = CogPatchify(16, 3072, 2) |
| 112 | self.time_embedder = TimestepEmbeddings(3072, 512) |
| 113 | self.context_embedder = torch.nn.Linear(4096, 3072) |
| 114 | self.blocks = torch.nn.ModuleList([CogDiTBlock(3072, 512, 48) for _ in range(42)]) |
| 115 | self.norm_final = torch.nn.LayerNorm((3072,), eps=1e-05, elementwise_affine=True) |
| 116 | self.norm_out = CogAdaLayerNorm(3072, 512, single=True) |
| 117 | self.proj_out = torch.nn.Linear(3072, 64, bias=True) |
| 118 | |
| 119 | |
| 120 | def get_resize_crop_region_for_grid(self, src, tgt_width, tgt_height): |
no test coverage detected