| 426 | |
| 427 | |
| 428 | class IdentityFirstStage(torch.nn.Module): |
| 429 | def __init__(self, *args, vq_interface=False, **kwargs): |
| 430 | self.vq_interface = vq_interface # TODO: Should be true by default but check to not break older stuff |
| 431 | super().__init__() |
| 432 | |
| 433 | def encode(self, x, *args, **kwargs): |
| 434 | return x |
| 435 | |
| 436 | def decode(self, x, *args, **kwargs): |
| 437 | return x |
| 438 | |
| 439 | def quantize(self, x, *args, **kwargs): |
| 440 | if self.vq_interface: |
| 441 | return x, None, [None, None, None] |
| 442 | return x |
| 443 | |
| 444 | def forward(self, x, *args, **kwargs): |
| 445 | return x |
nothing calls this directly
no outgoing calls
no test coverage detected