(self, batch, **kwargs)
| 840 | return self.first_stage_model.encode(x) |
| 841 | |
| 842 | def shared_step(self, batch, **kwargs): |
| 843 | x, c = self.get_input(batch, self.first_stage_key) |
| 844 | loss = self(x, c) |
| 845 | return loss |
| 846 | |
| 847 | def forward(self, x, c, *args, **kwargs): |
| 848 | t = torch.randint(0, self.num_timesteps, (x.shape[0],), device=self.device).long() |