MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / __init__

Method __init__

diffsynth/models/cog_dit.py:109–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107
108class 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):

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 4

CogPatchifyClass · 0.85
TimestepEmbeddingsClass · 0.85
CogDiTBlockClass · 0.85
CogAdaLayerNormClass · 0.85

Tested by

no test coverage detected