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

Method _get_calibration_data

tests/hooks/test_mag_cache.py:92–98  ·  view source on GitHub ↗
(self, model)

Source from the content-addressed store, hash-verified

90 module._diffusers_hook._set_context(context_name)
91
92 def _get_calibration_data(self, model):
93 for module in model.modules():
94 if hasattr(module, "_diffusers_hook"):
95 hook = module._diffusers_hook.get_hook("mag_cache_block_hook")
96 if hook:
97 return hook.state_manager.get_state().calibration_ratios
98 return []
99
100 def test_mag_cache_validation(self):
101 """Test that missing mag_ratios raises ValueError."""

Callers 1

Calls 2

get_hookMethod · 0.80
get_stateMethod · 0.45

Tested by

no test coverage detected