(self)
| 164 | ) |
| 165 | |
| 166 | def load_diffusion_model(self): |
| 167 | with accelerate.init_empty_weights(): |
| 168 | self.model.model = self.model.build_model() |
| 169 | net_state_dict = load_state_dict(self.model_config['transformer_path']) |
| 170 | incompatible = self.model.model.load_state_dict(net_state_dict, strict=False, assign=True) |
| 171 | missing_keys = [k for k in incompatible.missing_keys if "_extra_state" not in k] |
| 172 | assert len(missing_keys) == 0 |
| 173 | self.transformer = self.model.net |
| 174 | |
| 175 | def model_specific_dataset_config_validation(self, dataset_config): |
| 176 | passes_validation = True |
nothing calls this directly
no test coverage detected