(model)
| 1780 | |
| 1781 | @torch.no_grad() |
| 1782 | def run_forward(model): |
| 1783 | self.assertTrue( |
| 1784 | all( |
| 1785 | module._diffusers_hook.get_hook("group_offloading") is not None |
| 1786 | for module in model.modules() |
| 1787 | if hasattr(module, "_diffusers_hook") |
| 1788 | ) |
| 1789 | ) |
| 1790 | model.eval() |
| 1791 | return model(**inputs_dict)[0] |
| 1792 | |
| 1793 | model = self.model_class(**init_dict) |
| 1794 | model.to(torch_device) |