(self, batch_size, image_height, image_width, static_batch, static_shape)
| 177 | return (latent_height, latent_width) |
| 178 | |
| 179 | def get_minmax_dims(self, batch_size, image_height, image_width, static_batch, static_shape): |
| 180 | min_batch = batch_size if static_batch else self.min_batch |
| 181 | max_batch = batch_size if static_batch else self.max_batch |
| 182 | latent_height = image_height // 8 |
| 183 | latent_width = image_width // 8 |
| 184 | min_image_height = image_height if static_shape else self.min_image_shape |
| 185 | max_image_height = image_height if static_shape else self.max_image_shape |
| 186 | min_image_width = image_width if static_shape else self.min_image_shape |
| 187 | max_image_width = image_width if static_shape else self.max_image_shape |
| 188 | min_latent_height = latent_height if static_shape else self.min_latent_shape |
| 189 | max_latent_height = latent_height if static_shape else self.max_latent_shape |
| 190 | min_latent_width = latent_width if static_shape else self.min_latent_shape |
| 191 | max_latent_width = latent_width if static_shape else self.max_latent_shape |
| 192 | return (min_batch, max_batch, min_image_height, max_image_height, min_image_width, max_image_width, min_latent_height, max_latent_height, min_latent_width, max_latent_width) |
| 193 | |
| 194 | class CLIP(BaseModel): |
| 195 | def __init__(self, |
no outgoing calls
no test coverage detected