MCPcopy Index your code
hub / github.com/huggingface/diffusers / _set_context

Method _set_context

tests/hooks/test_mag_cache.py:86–90  ·  view source on GitHub ↗

Helper to set context on all hooks in the model.

(self, model, context_name)

Source from the content-addressed store, hash-verified

84 )
85
86 def _set_context(self, model, context_name):
87 """Helper to set context on all hooks in the model."""
88 for module in model.modules():
89 if hasattr(module, "_diffusers_hook"):
90 module._diffusers_hook._set_context(context_name)
91
92 def _get_calibration_data(self, model):
93 for module in model.modules():

Calls

no outgoing calls

Tested by

no test coverage detected