| 207 | |
| 208 | |
| 209 | class IdentityFirstStage(torch.nn.Module): |
| 210 | def __init__(self, *args, vq_interface=False, **kwargs): |
| 211 | self.vq_interface = vq_interface |
| 212 | super().__init__() |
| 213 | |
| 214 | def encode(self, x, *args, **kwargs): |
| 215 | return x |
| 216 | |
| 217 | def decode(self, x, *args, **kwargs): |
| 218 | return x |
| 219 | |
| 220 | def quantize(self, x, *args, **kwargs): |
| 221 | if self.vq_interface: |
| 222 | return x, None, [None, None, None] |
| 223 | return x |
| 224 | |
| 225 | def forward(self, x, *args, **kwargs): |
| 226 | return x |
| 227 |
nothing calls this directly
no outgoing calls
no test coverage detected