| 546 | |
| 547 | |
| 548 | class IdentityFirstStage(torch.nn.Module): |
| 549 | def __init__(self, *args, vq_interface=False, **kwargs): |
| 550 | self.vq_interface = vq_interface # TODO: Should be true by default but check to not break older stuff |
| 551 | super().__init__() |
| 552 | |
| 553 | def encode(self, x, *args, **kwargs): |
| 554 | return x |
| 555 | |
| 556 | def decode(self, x, *args, **kwargs): |
| 557 | return x |
| 558 | |
| 559 | def quantize(self, x, *args, **kwargs): |
| 560 | if self.vq_interface: |
| 561 | return x, None, [None, None, None] |
| 562 | return x |
| 563 | |
| 564 | def forward(self, x, *args, **kwargs): |
| 565 | return x |
nothing calls this directly
no outgoing calls
no test coverage detected