(
self,
batch_size: int,
frames: int,
height: int,
width: int,
sample_type: str = 'logitnorm',
device=None,
)
| 28 | self.base_scale = base_scale |
| 29 | |
| 30 | def sample_t_and_sigma( |
| 31 | self, |
| 32 | batch_size: int, |
| 33 | frames: int, |
| 34 | height: int, |
| 35 | width: int, |
| 36 | sample_type: str = 'logitnorm', |
| 37 | device=None, |
| 38 | ): |
| 39 | if sample_type == 'logitnorm': |
| 40 | t = self.logitnorm_sample_t( |
| 41 | batch_size, self.logit_mean, self.logid_std, device=device) |
| 42 | elif sample_type == 'uniform': |
| 43 | t = torch.rand((batch_size, ), device=device) |
| 44 | sigma = self.sigma_shift(t, frames, height, width) |
| 45 | # NOTE in the training process, the t is also shifted according to resolution |
| 46 | return sigma |
| 47 | |
| 48 | @staticmethod |
| 49 | def logitnorm_sample_t( |
nothing calls this directly
no test coverage detected