(file_path, torch_dtype=torch.bfloat16)
| 331 | |
| 332 | @staticmethod |
| 333 | def from_pretrained(file_path, torch_dtype=torch.bfloat16): |
| 334 | model = CogDiT().to(torch_dtype) |
| 335 | state_dict = load_state_dict_from_folder(file_path, torch_dtype=torch_dtype) |
| 336 | state_dict = CogDiT.state_dict_converter().from_diffusers(state_dict) |
| 337 | model.load_state_dict(state_dict) |
| 338 | return model |
| 339 | |
| 340 | |
| 341 |
no test coverage detected