(self, x, timesteps, y=None)
| 23 | self.encode_text = self.model.encode_text |
| 24 | |
| 25 | def forward(self, x, timesteps, y=None): |
| 26 | cond_mode = self.model.cond_mode |
| 27 | assert cond_mode in ['text', 'action'] |
| 28 | y_uncond = deepcopy(y) |
| 29 | y_uncond['uncond'] = True |
| 30 | out = self.model(x, timesteps, y) |
| 31 | out_uncond = self.model(x, timesteps, y_uncond) |
| 32 | return out_uncond + (y['scale'].view(-1, 1, 1, 1) * (out - out_uncond)) |
| 33 |
nothing calls this directly
no outgoing calls
no test coverage detected