MCPcopy Create free account
hub / github.com/huggingface/diffusers / run_forward

Method run_forward

tests/models/test_modeling_common.py:1782–1791  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

get_hookMethod · 0.80

Tested by

no test coverage detected