(self, x, args)
| 18 | self.decoder = VQVAE.from_checkpoint(decoder_path, **decoder_args) |
| 19 | |
| 20 | def ar_sample(self, x, args): |
| 21 | x = self.ar_model.sample( |
| 22 | x, |
| 23 | cfg_scale=args.get('cfg_scale', 1.0), |
| 24 | cfg_interval=args.get('cfg_interval', -1), |
| 25 | temperature=args.get('temperature', 1.0), |
| 26 | top_k=args.get('top_k', 0), |
| 27 | top_p=args.get('top_p', 1.0) |
| 28 | ) |
| 29 | return x |
| 30 | |
| 31 | def post_process(self, x): |
| 32 | x = x.cpu().float().clamp(0., 1.) * 255. |
no test coverage detected