(self, cond, batch_size, ddim, ddim_steps, **kwargs)
| 1116 | |
| 1117 | @torch.no_grad() |
| 1118 | def sample_log(self, cond, batch_size, ddim, ddim_steps, **kwargs): |
| 1119 | if ddim: |
| 1120 | ddim_sampler = DDIMSampler(self) |
| 1121 | shape = (self.channels, self.image_size, self.image_size) |
| 1122 | samples, intermediates = ddim_sampler.sample(ddim_steps, batch_size, |
| 1123 | shape, cond, verbose=False, **kwargs) |
| 1124 | |
| 1125 | else: |
| 1126 | samples, intermediates = self.sample(cond=cond, batch_size=batch_size, |
| 1127 | return_intermediates=True, **kwargs) |
| 1128 | |
| 1129 | return samples, intermediates |
| 1130 | |
| 1131 | @torch.no_grad() |
| 1132 | def get_unconditional_conditioning(self, batch_size, null_label=None): |
no test coverage detected