(self, batch_size, image_height, image_width)
| 312 | } |
| 313 | |
| 314 | def get_sample_input(self, batch_size, image_height, image_width): |
| 315 | latent_height, latent_width = self.check_dims(batch_size, image_height, image_width) |
| 316 | dtype = torch.float16 if self.fp16 else torch.float32 |
| 317 | return ( |
| 318 | torch.randn(2*batch_size, self.unet_dim, latent_height, latent_width, dtype=torch.float32, device=self.device), |
| 319 | torch.tensor([1.], dtype=torch.float32, device=self.device), |
| 320 | torch.randn(2*batch_size, self.text_maxlen, self.embedding_dim, dtype=dtype, device=self.device) |
| 321 | ) |
| 322 | |
| 323 | def make_UNet(version, hf_token, device, verbose, max_batch_size, inpaint=False): |
| 324 | return UNet(hf_token=hf_token, fp16=True, device=device, verbose=verbose, path=get_path(version, inpaint=inpaint), |
nothing calls this directly
no test coverage detected