| 202 | return x |
| 203 | |
| 204 | class IdentityFirstStage(torch.nn.Module): |
| 205 | def __init__(self, *args, vq_interface=False, **kwargs): |
| 206 | self.vq_interface = vq_interface # TODO: Should be true by default but check to not break older stuff |
| 207 | super().__init__() |
| 208 | |
| 209 | def encode(self, x, *args, **kwargs): |
| 210 | return x |
| 211 | |
| 212 | def decode(self, x, *args, **kwargs): |
| 213 | return x |
| 214 | |
| 215 | def quantize(self, x, *args, **kwargs): |
| 216 | if self.vq_interface: |
| 217 | return x, None, [None, None, None] |
| 218 | return x |
| 219 | |
| 220 | def forward(self, x, *args, **kwargs): |
| 221 | return x |
nothing calls this directly
no outgoing calls
no test coverage detected